Forum Moderators: coopster

Message Too Old, No Replies

Help with mail() and Hotmail!

I cannot send mail to hotmail addresses!

         

Deepain

2:34 am on Feb 2, 2004 (gmt 0)

10+ Year Member



Over the past two weeks, I have noticed that I have suddenly not been able to send e-mails to send e-mails to hotmail addresses with my PHP script. I can, however, send mail to non-hotmail addresses. Can anybody help, please?

The script I am using at the moment is as follows:

<?php

// Send E-Mail
$my_name = "Dave";
$my_email = "me@domain.com";
$to_name = "Dave";
$to_email = "myaddress@hotmail.com";
$subject = "Hello!";
$message = "testing!";
$mailheaders = "From: $my_name <$my_email>\n";
$mailheaders .= "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-Type: text/html; charset=iso-8859-1";
mail("$to_name <$to_email>", "$subject", "$message", "$mailheaders");

?>

Muchly appreciated.
Dave.

Mardi_Gras

3:32 am on Feb 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Microsoft has been filtering Hotmail for about the past month. I suspect the problem is that your mail is being blocked.

Deepain

3:47 am on Feb 2, 2004 (gmt 0)

10+ Year Member



I see.. I'll have to look into why and how to stop it ;)

Many Thanks,
Dave.

P.S. Is the coding I posted sound, or do you think I should make any improvements to it (putting the filtering aside).

Mardi_Gras

3:48 am on Feb 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>P.S. Is the coding I posted sound,

I'll leave others to answer that question - outside of my expertise ;)

jatar_k

7:20 pm on Feb 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld Deepain,

I don't see any issues with the coding. mail headers are always a little tricky. Different providers like to complain about different things. The key is to find a set that works fairly well for your users.

bcolflesh

7:28 pm on Feb 2, 2004 (gmt 0)