note 39918 deleted from ref.mail by nlopess
| From: | nlopess@php.net | Date: | Sun, 15 Feb 2004 19:22:19 +0000 |
| Subject: | note 39918 deleted from ref.mail by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-65179@lists.php.net to get a copy of this message | ||
Note Submitter: billyp1970@hotmail.com
----
I was unable to send email to Hotmail for a long time, I scoured php.net, codewalkers.com,
phphelp.com just to name a few to find some answers. I submitted code for help, and the only thing
I heard was maybe Hotmail had black-listed my IP or domain name. I don't know if this is true,
but I wrote to them to find out, haven't heard anything back yet. I wrote to my host, the same
day and told him I wrote Hotmail (they had been working on trying to resolve this issue for a week).
I then found some code (I don't remember where) that may have helped. One of these three
things allowed me to send email to Hotmail. I understand Hotmail really doesn't like php
mail(), but this code works. Just so you know, I am cut-and-pasting this code (with the exception
of changing the website name) so there are no errors in retyping below. I hope this helps
someone....
function notify_password($email, $password)
{
$to = $email;
$subject = "Your Web-Site.com Password";
$msg = "Here is your new password. Please be sure to change it when you log in
next.\n";
$msg .= $password;
$headers = "From: \"Belgian-Primeurs\" <support@web-site.com>\r\n";
$headers .= "Reply-To: support@web-site.com\r\n";
$headers .= "Organization: www.web-site.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-encoding: 8bit\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: PHP/" . phpversion()."\r\n";
$headers .= "X-Sender: support@web-site.com\r\n";
$headers .= "Return-Path: support@web-site.com\r\n";
if (mail($to, $subject, $msg, $headers))
return true;
else
return false;