I have an email set up to pipe e-mail to a php file. The php file runs great when I do not use mailparse, but when I do it returns "local delivery failed" to the email sender. This is the script I have running:
What can I do to make the script work? Thanks in advance.
PHP:
#!/usr/bin/php -q
<?php
ob_start();
$data = '';
$time = time();
$file = fopen('php://stdin', 'r');
while(!feof($file))
{
$data .= fgets($file, 4096);
}
$maild = mailparse_msg_create();
$mime = mailparse_msg_parse($maild,$data);
$struct = mailparse_msg_get_structure($maild);
ob_end_clean();
?>
What can I do to make the script work? Thanks in advance.







