When trying to send mail automatically from a script at example.com via PHP's mail() to
[email protected], the Apache server throws an Internal Error. I believe internally it is configured to use sendmail. The message gets dropped into ~/dead.
letter and the general error log reads:
[Wed May 12 11:26:45 2010] [error] [client xxx.xxx.xxx.xxx] malformed header from script. Bad header=/home/example/dead.
letter... S: /home/example/www/test.php
Trying any other address, not @example.com, works just fine.
I have googled and serverfaulted for solutions, but they all require to edit configuration files in /etc/mail and similar system places, which is not an option, since this problem occurs on a shared host in which I only have access to ~/.
Does anyone have a suggestion?