note 29700 added to ref.mail
| From: | reisve at netcabo dot pt | Date: | Fri, 21 Feb 2003 23:46:03 +0000 |
| Subject: | note 29700 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44332@lists.php.net to get a copy of this message | ||
Very strange...
If I use the headers like this (with \r\n like everybody says they should be):
function send_mail($from_name, $from_mail, $to_name, $to_mail, $subject, $message) {
$to = "\"$to_name\" <$to_mail>\n";
$headers = "From: \"$from_name\" <$from_mail>\n";
$headers .= "Reply-To: \"$from_name\" <$from_mail>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Mailer: PHP4\r\n";
return(mail($to, $subject, $message, $headers));
}
I get the headers in body of the message. If, instead, I only use \n, everything works fine. Any
explanation ???
--
http://www.php.net/manual/en/ref.mail.php
http://master.php.net/manage/user-notes.php?action=edit+29700
http://master.php.net/manage/user-notes.php?action=delete+29700
http://master.php.net/manage/user-notes.php?action=reject+29700