Jump to content

mail( ) NOT sending to hotmail but does to other email servers!?


leeming

Recommended Posts

mail( ) has been working for over a year on my server, but only recently i have had members complaining to me that emails have not been sent to them...
after testing this myself i found out when using mail, it will not send to my hotmail.
I even tried sending it to an email it actually sends to, and having an automatic forward (that didn't work)
Then i even went onto hotmail's options and set it to accept the email i was using as the "from" header... nope.. still no email

i even looked on the forums for some headers that hotmail 'like'

[quote author=HuggieBear link=topic=107959.msg433816#msg433816 date=1158185415]
Are you including the [b]to:[/b] address anywhere in the headers?  If you are, remove it.  This works well for me:

[code]<?php
  $from_name = "HuggieBear";
  $from_address = "address@domain.com";
 
  $to_name = "ToonMariner";
  $to_address = "$to_name <address@domain.com>";
 
  $subject = "Give this a try";
  $message = "I last tested this with hotmail.com today and it still works fine.";
 
  $headers .= "MIME-Version: 1.0\r\n";
  $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
  $headers .= "From: $from_name <$from_address>\r\n";
  $headers .= "Reply-To: $from_name <$from_address>\r\n";
  $headers .= "X-Priority: 1\r\n";
  $headers .= "X-MSMail-Priority: High\r\n";
  $headers .= "X-Mailer: My Test Mailer";

  $success = mail($to_address, $subject, $message, $headers);
  if ($success) {
  echo "The email to $to from $from was successfully sent";
}
else {
echo "An error occurred when sending the email to $to from $from";
}
?>[/code]

Regards
Rich
[/quote]

that didn't even work...

i am totally stuck why hotmail decided not to accept any of my emails
Link to comment
Share on other sites

[quote author=drifter link=topic=119596.msg489997#msg489997 date=1166760979]
what if your mailer was open to header injection, and people were using your form to spam and your IP is now blocked by them?

just a thought
[/quote]

i checked the "MAPs" site and a few others.. my server isnt blocked (i dont think any way)... but the only part of my sites that allow email.. is the registration.. i just using sum sample code to try break thru this hotmail 'block'
Link to comment
Share on other sites

[quote author=Daniel0 link=topic=119596.msg490083#msg490083 date=1166777676]
Check your junk folder.
[/quote]

I must of forgotten to add.... not in spam either... its just not getting thru to hotmail.....

since i posted this.. i have been testing alot of headers to see if hotmail would like any of them.... nope.. still wont get thru....

im now using this code to test....
[code]
<?php
if($_POST['submit'])
{
    $recipient = $_POST['email'];
    $subject = "Complete your Bavad.Com Registration";

    $headers = "From: leeming <leeming@bavad.com>\r\n";
    $headers .= "Reply-To: leeming <leeming@bavad.com>\r\n";
    $headers .= "Return-Path: leeming <leeming@bavad.com>\r\n";
    $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .=  "Content-type: text/plain; charset=ISO-8859-1;\r\n";
    $headers .=  "Message-ID: <". time() .rand(1,1000). "@".$_SERVER['SERVER_NAME'].">". "\r\n" ;
    $headers .=  "Date: ".date("r")."\r\n".
    $headers .=  "Subject: ".$subject."\r\n";
   
   
    $message = "Welcome to bavad.com! lets talk\n about loads of stuff\n password and stuff here";


    if(mail($recipient, $subject, $message, $headers))
    {
        echo "Mail (apparently) sent";
    }
}

echo("<form name='email' method='post'>");
echo("Recipieint: <input type='text' name='email' size='30'> <input type='submit' name='submit'>");
?>
[/code]


~edit~

after more and more research on this topic, i am coming to the conclusion it is hotmail blocking the server or what ever, instead of the headers.. (kinda as bad as AOL)
if there any way i can find out if my server is blacklisted *like said originally, i checked, but it said i hadn't*

extra info for ya:
My server is Linux
Apache version:  1.3.37 (Unix)
And its data center is in Texas i think...

could any of them factors affect it in any way?
i will continue researching this...
Link to comment
Share on other sites

[quote author=jesirose link=topic=119596.msg491963#msg491963 date=1167198309]
Have you tried other hotmail accounts?
[/quote]
You caught me as i was adding an edit..

yes i have tried more hotmail accounts... its the reason it popped up in the 1st place, because my members where complaining to me they wasn't getting an email
Link to comment
Share on other sites

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.