note 67903 added to ref.mail
| From: | szymon | Date: | Thu, 06 Jul 2006 08:13:00 +0000 |
| Subject: | note 67903 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114485@lists.php.net to get a copy of this message | ||
I've just resolved a problem with sending email using mail(); (mail not sent). The problem was
\n at the end of the header or headers. Ie. this didn't work:
<?php
$headers .= "X-Sender: NAME <noreply@host.pl>\n";
$headers .="From: NAME <noreply@host.pl>\n";
?>
I changed it to...
<?php
$enter = chr(13) . chr(10);
$headers .= "X-Sender: NAME <noreply@host.pl>".$enter;
$headers .="From: NAME <noreply@host.pl>".$enter;
?>
and now it works :-) I hope this will help someone.
----
Server IP: 195.136.184.34
Probable Submitter: 81.219.215.90
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- http://master.php.net/note/edit/67903
Del: integrated -- http://master.php.net/note/delete/67903/integrated
Del: useless -- http://master.php.net/note/delete/67903/useless
Del: bad code -- http://master.php.net/note/delete/67903/bad+code
Del: spam -- http://master.php.net/note/delete/67903/spam
Del: non-english -- http://master.php.net/note/delete/67903/non-english
Del: in docs -- http://master.php.net/note/delete/67903/in+docs
Del: other reasons-- http://master.php.net/note/delete/67903
Reject -- http://master.php.net/note/reject/67903
Search -- http://master.php.net/manage/user-notes.php