Jump to content

[SOLVED] Sent mail to hotmail trough PHP


Ludo DS

Recommended Posts

Dear,

 

I'd like to send a mail to my hotmail adres but it doesn't work. I changed the variable to my gmail account and that works.

 

Are there any headers I can use to solve this problem. Or?

 

Thanks in advance.

 

<?php

 

 

 

$sentto = "koen";

$email = "[email protected]";

 

$subject = "You have mail";

$message = "Hello $sentto,

 

You have mail waiting for you.

 

//This is where the body of my message would be

 

 

Thank you,

K.

 

This is an automated response, please do not reply.";

 

mail($email, $subject, $message,"From: Live.com <[email protected]>\nX-Mailer: PHP/" . phpversion());

 

echo "<b>Naam: </b>";

echo " $sentto";

echo "<br>\n";

echo "<b>E-mail: </b>";

echo " $email";

echo "<br>\n";

echo "<br>\n";

echo "<br>\n";

 

 

 

?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/176534-solved-sent-mail-to-hotmail-trough-php/
Share on other sites

You are putting a @hotmail.com address into the From: address. Hotmail knows that you are not sending the email from a hotmail mail server and is discarding it. You need to put a valid email address host at the sending mail server into the From: address.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.