I am writing a php script to run on CLI.
I am forwarding email messages to that script to be processed and then redirected. The script works perfectly, but I can't get rid of an error message that the mail server send every time the script is executed.
I think the server is sending the error message because my script should return the proper exit status, but i tried with:
exit(0);
exit;
return 0;
and it isn't working.
Anyone knows how should i terminate the script to get rid of that error message?
I post here the email message with the error in case it helps:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
pipe to | /home/cagslc/mail_redir.php
generated by abc@CompositeAeroGroup.com
The following text was generated during the delivery attempt:
------ pipe to | /home/cagslc/mail_redir.php
generated by abc@CompositeAeroGroup.com ------
Content-type: text/html
X-Powered-By: PHP/4.3.8
------ This is a copy of the message, including all the headers. ------
As you can see, php is pasing "Content-type: text/html ..."
but why?
Thanks for your help.