note 26277 deleted from ref.mail by didou
| From: | didou@php.net | Date: | Sun, 07 Dec 2003 02:27:48 +0000 |
| Subject: | note 26277 deleted from ref.mail by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61520@lists.php.net to get a copy of this message | ||
Note Submitter: Dark_Spirit at beyondinfinit dot com
----
I followed an example from Godfried van Loo and found an error in his code. Hotmail was sending my
mail to the recipient's junk mail. I found out that if you remove the "To: " line
from the header, hotmail sends the mail to the inbox. here is my code:
function SEND_HTML_MAIL($mail_info) {
$from_name = $mail_info["from_name"];
$from_address = $mail_info["from_address"];
$to_name = $mail_info["to_name"];
$to_address = $mail_info["to_name"]."
<".$mail_info["to_address"].">";
$message = $mail_info["message"];
$subject = $mail_info["subject"];
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$from_name." <".$from_address.">\r\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
mail($to_address, $subject, $message, $headers);
}
I hope this code will help you out.
Simon Germain
www.beyondinfinit.com