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
";

$headers= "From: Skye Crew<info@skyecrew.co.za>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP4\n"; 
$headers .= "Content-Type: text/plain\r\n";
$headers .= "Content-Transfer-Encoding: 8bit\r\n";
$headers .= "Message-ID: \r\n";

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.

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.

Thanks for the suggestion - that was the next step I was going to try today. Hope I can get it to work - thank-you.

Hi Keanan

You can try out this

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: test@abc' . "\r\n";
mail($emailid, 'Test Mail', $message, $headers);

Ok tried php mailer and it sends to all accounts except hotmail :(
What can I say hotmail stinks!!!

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';

Hi,

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

$headers = array ('From' => $from,
	  'To' => $to,
	  'Subject' => $subject);
	$smtp = Mail::factory('smtp',
	  array ('host' => $host,
	    'auth' => true,
	    'username' => $username,
		'password' => $password));

	$mail = $smtp->send($to, $headers, $body);

	if (PEAR::isError($mail)) {
	  echo("<p>" . $mail->getMessage() . "</p>");
	 } else {
	  echo("<p>Message successfully sent!</p>");

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.

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.
;-)

this code is not working..please help..my mail not going to outlook id using php..i have used many code but still not work..plz help me

my mail is not going to outlook id. please help me..i have used many code but still not working..give me proper code plz..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.