PHP Mail Error

Discussion in 'PHP' started by cancer10, May 23, 2007.

  1. #1
    Hello,

    I am trying to send an email through php using the mail() function but getting the following error:

    Warning: mail() [function.mail]: SMTP server response: my-server-name-here [my-ip-address-here] is currently not 550-permitted to relay through this server. Perhaps you have not logged into 550-the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.
    Code (markup):
    My PHP Code is:

    <?php
    $to      = 'nobody@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: webmaster@example.com' . "\r\n" .
        'Reply-To: webmaster@example.com' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
    
    mail($to, $subject, $message, $headers);
    ?>
    Code (markup):
    FYI: I am running this code on windows 2003 server and i can send email using Horde.

    What I am guessing is I need to add smtp authentication in my php code, so If you can tell me what is the syntax that can help me.

    Does anyone know how to overcome this problem?


    Thanx
     
    cancer10, May 23, 2007 IP
  2. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #2
    I have always used PHP with Linux. And asp with windows. I didn't think that PHP would run on a Windows server without some modifications.
     
    livingearth, May 23, 2007 IP
  3. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i m running the same php code on another server which has plesk and its working fine there :)

    The current one is with Helm
     
    cancer10, May 23, 2007 IP