PHP mail function and hotmail

Discussion in 'PHP' started by Mooseman, Apr 25, 2008.

  1. #1
    I'm not sure weather this is a server issue or hotmail issue.

    I've have an email activation script on a new project I'm starting, but the problem is that the user don't recieve the email with the activation code.
    The email is not recieved when I'm sending to my hotmail account.
    It works fine though to send it to my account. (the email account of the same server I'm on)

    I've tried 5000 different headers that are "supposed to work", but nothing works.

    This is the script. (currently)
    $to  = "user@mydomain.com";
    $subject = 'This subject';
    $message = "Message goes here";
    
    // Headers för att skicka html mail
    $headers = 'From: to@email.com' . "\r\n";
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    
    // Mail it
    mail($to, $subject, $message, $headers);
    
    PHP:
    When I'm sending the mail from my localhost server it works, but from the online server it doesn't..

    Oh, and I tried the PHPMailer to see if that works but I get this error:
    That happens on all email except the email account to the server I'm on.

    Could this be a server issue?
    I find it wierd I can't send a mail to anyone but myself.. :S
     
    Mooseman, Apr 25, 2008 IP
  2. !Redghost!

    !Redghost! Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    thanks ..
    ـــ
    Redghost
     
    !Redghost!, Apr 25, 2008 IP
  3. Mooseman

    Mooseman Peon

    Messages:
    453
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What???????
     
    Mooseman, Apr 25, 2008 IP