unable to send email to hotmail via php mail()

Thread Solved

Join Date: Jul 2008
Posts: 11
Reputation: keanan is an unknown quantity at this point 
Solved Threads: 1
keanan keanan is offline Offline
Newbie Poster

unable to send email to hotmail via php mail()

 
0
  #1
Aug 4th, 2008
Hello,

I have been searching far and wide but am yet to find a solution, my php mail sends email to all addresses except hotmail (not weven junk).

Code:

$message = "Welcome to Sky Crew,

Your personal account for the Skye Crew has been created!

Your personal login ID and password are as follows:

userid: ******
password: *****

To log in, proceed to the following address:

http://www.skyecrew.co.za/login.php

Skye Crew Team
";

  1. $headers= "From: Skye Crew<info@skyecrew.co.za>\r\n";
  2. $headers .= "MIME-Version: 1.0\r\n";
  3. $headers .= "X-Mailer: PHP4\n";
  4. $headers .= "Content-Type: text/plain\r\n";
  5. $headers .= "Content-Transfer-Encoding: 8bit\r\n";
  6. $headers .= "Message-ID: \r\n";
  7.  
  8. mail($_POST['user'],"Your Password for the Skye Crew Website", $message, $headers);

I have tried many different headers, messages and ways to write them yet still no success.

If you have any suggestions or a working php mail script which goes through to hotmail please help me, thank-you.
Last edited by peter_budo; Aug 4th, 2008 at 12:47 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: unable to send email to hotmail via php mail()

 
0
  #2
Aug 4th, 2008
Hello, I use class.phpmailer.php. It works for Yahoo, Hotmail, GMail, and I'm sure many others that I haven't tested. It also includes an example which is easy to follow.
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 11
Reputation: keanan is an unknown quantity at this point 
Solved Threads: 1
keanan keanan is offline Offline
Newbie Poster

Re: unable to send email to hotmail via php mail()

 
0
  #3
Aug 5th, 2008
Thanks for the suggestion - that was the next step I was going to try today. Hope I can get it to work - thank-you.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 3
Reputation: kittu007 is an unknown quantity at this point 
Solved Threads: 1
kittu007 kittu007 is offline Offline
Newbie Poster

Re: unable to send email to hotmail via php mail()

 
0
  #4
Aug 5th, 2008
Hi Keanan

You can try out this

  1. $headers = 'MIME-Version: 1.0' . "\r\n";
  2. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  3. $headers .= 'From: test@abc' . "\r\n";
  4. mail($emailid, 'Test Mail', $message, $headers);
Last edited by peter_budo; Aug 5th, 2008 at 1:10 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 11
Reputation: keanan is an unknown quantity at this point 
Solved Threads: 1
keanan keanan is offline Offline
Newbie Poster

Re: unable to send email to hotmail via php mail()

 
0
  #5
Aug 5th, 2008
Ok tried php mailer and it sends to all accounts except hotmail
What can I say hotmail stinks!!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 11
Reputation: keanan is an unknown quantity at this point 
Solved Threads: 1
keanan keanan is offline Offline
Newbie Poster

Re: unable to send email to hotmail via php mail()

 
0
  #6
Aug 5th, 2008
Hi Kittu,

Thanks tried the code and about 20 other examples but still no luck with hotmail.

Maybe my isp is blacklisted with them? I dont know, it just seems weird that the emails go to all other accounts I have tested.

$hotmail == 'poo';
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 16
Reputation: davewylie is an unknown quantity at this point 
Solved Threads: 1
davewylie davewylie is offline Offline
Newbie Poster

Re: unable to send email to hotmail via php mail()

 
0
  #7
Aug 5th, 2008
Hi,

I have successfully sent mail to an email address using the following code:

  1. $headers = array ('From' => $from,
  2. 'To' => $to,
  3. 'Subject' => $subject);
  4. $smtp = Mail::factory('smtp',
  5. array ('host' => $host,
  6. 'auth' => true,
  7. 'username' => $username,
  8. 'password' => $password));
  9.  
  10. $mail = $smtp->send($to, $headers, $body);
  11.  
  12. if (PEAR::isError($mail)) {
  13. echo("<p>" . $mail->getMessage() . "</p>");
  14. } else {
  15. echo("<p>Message successfully sent!</p>");
Last edited by peter_budo; Aug 5th, 2008 at 1:10 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: unable to send email to hotmail via php mail()

 
0
  #8
Aug 5th, 2008
I'm terribly sorry. I actually use class.smtp.php. I downloaded them both at the same time, got this one to work first, and haven't messed with it in over a year. The script actually has a login and password where you authenticate yourself to your mail exchange and then the email gets sent authentically from your mail exchange with lots of good safe header information that hotmail requires. I've never had a problem getting into hotmail or any other client with this class. It can also send both html and plain text email.
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,076
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: unable to send email to hotmail via php mail()

 
0
  #9
Aug 5th, 2008
hello keanan...
see this link, will help to solve your problem...
http://bestdeveloper.blogspot.com/20...ig-emails.html
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 11
Reputation: keanan is an unknown quantity at this point 
Solved Threads: 1
keanan keanan is offline Offline
Newbie Poster

Re: unable to send email to hotmail via php mail()

 
0
  #10
Aug 6th, 2008
Hello,

Thank-you for replying and for your help - I have found the problem.

I used the smtp function in php mailer where I gave authentication etc. and still it didn't work - so i opened another hotmail account to be certain and still had same results.

I then sent an email from webmail to my hotmail accounts (which is the first thing I should have tried - sorry for any inconvenience caused) and the email donot go through - they only go through when replying to a email from hotmail - but unable to send.

So I will speak to our DNS people today as I am now certain it is blacklisted with hotmail.

Sorry to waste your time and thank-you.
;-)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 2960 | Replies: 9
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC