Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2003
    Thanked 0 Times in 0 Posts

    Why is hotmail rejecting php emails - mail()

    this is the code i'm doing:

    $to = " $_POST[nick1] < $_POST[email]>";
    $subject = "Verify your account";

    $message = '
    Hello '. $_POST['nick1'] .',
    Welcome to dEVLE wORM. All you have left to do is follow the link below.<br>
    http://domain.com/verify/?id='. md5($_POST[nick1]) .'<br>
    Once your email is verified your account will be activated and you will be able to login.<br><br>



    $headers = "From: domain.com <noone@domain.com>\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/plain;"\n";
    $headers .= "Reply-To: domain.com noone@devleworm.com>\n";
    $headers .= "X-Priority: 1\n";
    $headers .= "X-MSmail-Priority: High\n";
    $headers .= "X-mailer: domain.com";

    mail ($to, $subject, $message, $headers);

    hotmail and yahoo don't even show the email, if they do it is in junk mail.
    PHP | FreeBSD | MySQL |
    Check documentation... check documentation again and actually read it..do it... doesn't work ask.

  2. #2
    New Coder
    Join Date
    May 2002
    Thanked 0 Times in 0 Posts
    Assuming your domain is not on some sort of blacklist it may be finding something wrong with your headers, or you have sent too many to the address at one time.

    Yahoo and Hotmail seem to react well to these set of headers:

    $headers="Subject: $subject\r\n";
    $headers.="From: $myemail\r\n";
    $headers.="To: $toname <$toemail>\r\n";
    $headers.="X-Sender: <$myemail>\r\n";
    $headers.="Return-Path: <$myemail>\r\n";
    $headers.="Errors-To: <$myemail>\r\n";
    $headers.="X-Mailer: PHP\r\n
    $headers.="X-Priority: 3\r\n";

    This is not including the content header which you can include based off your own content. I leave out
    $headers .= "X-MSmail-Priority: High\n";

    because spamassain will grab it. It detects that it appears to be faking outlook and that is worth several points on the spam point scale.

    Though I think likely you just have to find the right combination of headers


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts