Jump to content

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 = "michael.kelso@live.com";

 

$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 <happyholidaysyoubastard@hotmail.com>\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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.