RE: [PHP] Unreliable mail delivery through PHP
| From: | Chris W. Parker | Date: | Tue, 14 Dec 2004 17:39:33 +0000 |
| Subject: | RE: [PHP] Unreliable mail delivery through PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-204322@lists.php.net to get a copy of this message | ||
Jason Wong <mailto:php-general@gremlins.biz>
on Monday, December 13, 2004 10:52 PM said:
> On Tuesday 14 December 2004 07:43, Chris W. Parker wrote:
>
>> $headers = "From: $from\n"
>> ."Reply-To: $from\n"
>> ."X-Mailer: PHP/".phpversion();
>
> Headers should be separated by "\r\n". Not sure why you're
> duplicating the From:.
Didn't know about the \r\n and I also didn't realize I was repeating the
From value! :)
>> Assuming all the email addresses are correct, is there anything about
>> the above two functions that is incorrect or might be causing the
>> unreliable'ness'? Or maybe someone has some tips for debugging this
>> kind of thing?
>
> Does your mailserver logs have anything to say?
>
> Is the send_email() function being called at all? I would use
> trigger_error() or similar to write a message in the (php) log after
> mail() so that I would know for sure mail() was executed.
Good ideas. I will look into them.
Thanks,
Chris.