note 28067 added to function.mail
| From: | shena at darklock dot com | Date: | Tue, 31 Dec 2002 19:52:42 +0000 |
| Subject: | note 28067 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41522@lists.php.net to get a copy of this message | ||
Ok, two things:
1) if you are writing sentences in your message body that start with "From" then edit them
to start with something else. Sentences cannot start with "From" in the message body or
they will end up with a > in front of them. This is to differentiate them from the header
"From" and so it is a feature, not a bug, although for months I thought it was the latter!
2) If you are trying to check whether or not your mail has been sent using something similar to
this:
$result = mail(etc);
and the $result is consistently coming back as FALSE even though the mail was indeed sent, then it
is likely that your mail agent is returning an error code after sending mail. This is likely due to
a misconfiguration in the agent. I use sendmail, and it was returning an error about not finding
localip.db file every time mail was sent, and this was confusing mail(). It kept returning FALSE
even though the mail was sent. I corrected the sendmail configuration and then mail() would return
TRUE correctly when mail was sent.
That was ANOTHER problem I thought for sure was a bug for a long time - when I figured out what it
was, I realized it was simply a shortcoming in mail().
--
http://www.php.net/manual/en/function.mail.php
http://master.php.net/manage/user-notes.php?action=edit+28067
http://master.php.net/manage/user-notes.php?action=delete+28067
http://master.php.net/manage/user-notes.php?action=reject+28067