Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PHP - mail() problem!

Options
  • 29-08-2006 9:34pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    I have apache and PHP and mysql all installed fine, im after installing a mail server program onto the same PC as the site is hosted on, the mail server sends mail fine, when i go to the retrieve password page on the site i get the below error, cant seem to figure it out, i've gone throught the php.ini file and its all pointing to 'localhost' on port 25 which is right as far as i know.
    Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Apache\htdocs\test_dn\lost.php on line 92

    I've also checked line 92 and this is the code i have:
    mail($_POST['newusername'],"Site - Password",
            $message, "From: noreply@site.com");
    

    Can anyone help please???


Comments

  • Moderators, Politics Moderators Posts: 39,923 Mod ✭✭✭✭Seth Brundle


    is $_POST a valid email address?


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Ye it is, i got it sorted, i had the smtp server set as 'localhost' in the php.ini file when the mail server name is set to the IP of the system!

    Thanks anyways.


Advertisement