note 26277 added to ref.mail

From: Date: Thu, 24 Oct 2002 18:20:09 +0000
Subject: note 26277 added to ref.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-38517@lists.php.net to get a copy of this message
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 -- http://www.php.net/manual/en/ref.mail.php http://master.php.net/manage/user-notes.php?action=edit+26277 http://master.php.net/manage/user-notes.php?action=delete+26277 http://master.php.net/manage/user-notes.php?action=reject+26277

« previous php.notes (#38517) next »