note 22964 added to function.mail
| From: | mail at heiko-hinz dot de | Date: | Fri, 05 Jul 2002 13:37:23 +0000 |
| Subject: | note 22964 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32633@lists.php.net to get a copy of this message | ||
I tried to send mails on a w2k-server with the smtp-service. I use the following script:
$headers = "To: \"$toName\" <$toEmail>\r\n";
$headers .= "Reply-To: \"$fromName\" <$fromEmail>\r\n";
$headers .= "From: \"$fromName\" <$fromEmail>\r\n";
$headers .= "X-Sender: <$fromEmail>\r\n";
$headers .= "X-Mailer: PHP\r\n";
$headers .= "X-Priority: 3\r\n"; $headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail("\"$toEmail\"", "$HEADER - SWM-eCard", $emailBody, $headers);
PHP sends the mails to the smtp-service, this works, but the smtp-service always put them in the
badmail-directory.
In the header of the bad mails I found:
X-Envelope-To: toEmail@serverName
toEmail = john@do.com
serverName = myserver.com
Can somebody help me?
--
http://www.php.net/manual/en/function.mail.php
http://master.php.net/manage/user-notes.php?action=edit+22964
http://master.php.net/manage/user-notes.php?action=delete+22964
http://master.php.net/manage/user-notes.php?action=reject+22964