Hotmail Unable To Recieve Email Using Pear Mail

Ok, I was trying to break the habit of using the mail() function and instead start using pear's mail library so I can authenticate myself and I won't have to send as "nobody". <br /><br />Well, I wrote a sample script and had it send 3 emails, one for each of the largest free email providers. One to gmail, yahoo, and hotmail. All of them go through fine except hotmail. It doesn't throw it in the junk mail, it just doesn't get delivered. I've tried this on 2 servers, one on tch and also on another host. Same results...Any Ideas? If someone wants to try it out, that would be great. <br /><br />Here is the snippet of code to get you going. <br /><br /><a href="http://section31.us/scripts/test/smtp/hotmail.wth.phps" target="_blank">http://section31.us/scripts/test/smtp/hotmail.wth.phps</a><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?<br />error_reporting(E_ALL);<br />include('Mail.php');<br /><br />$headers['From'] = 'name <[email protected]>';  // put your name and email here<br />$headers['Subject'] = 'Testing SMTP Mail';<br /><br />$body = 'This is a plain text body message.';<br /><br />$params['auth'] = true;<br />$params['host'] = 'localhost';<br />$params['username'] = '[email protected]';  // put your username here which is your email address<br />$params['password'] = 'pass'; // pur your pass here<br />$params["persist"] = true;<br /><br />$mail_object =& Mail::factory('smtp', $params);<br /><br />foreach (array('[email protected]', '[email protected]', '[email protected]') as $to) {  // put your emails here<br />    $headers['To'] = $to;<br />    $mail_object->send($to, $headers, $body);<br />    echo "Email sent to $to!<br />";<br />}<br />?><!--c2--></div><!--ec2--><!--content-->
Hm, now I can't seem to send any type of email to hotmail without it being filtered as spam. <br /><br />I've tried doing a very basic email using mail(), then I tried using php mail classes like <a href="http://phpmailer.sourceforge.net/" target="_blank">PHP Mailer</a> and <a href="http://www.phpguru.org/static/mime.mail.html" target="_blank">Richard Heyes Mail Class.</a><br /><br />All emails are being put in the junk email. Any ideas? Has anyone had success with this?<!--content-->
If it were me I'd either wait a day and see if Hotmail is doing something squirrely or send the email content to the helpdesk to see if they know of any issues regarding email. <br /><br />Are you sure the content doesn't look like junk? Some filters will call email junk if there's no subject line or if it contains certain words.<br /><br />Hope you can get it worked out soon.<!--content-->
 
Back
Top