note 22964 rejected from function.mail by victor
| From: | victor@php.net | Date: | Thu, 05 Sep 2002 18:31:13 +0000 |
| Subject: | note 22964 rejected from function.mail by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36187@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?