Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

PHP - mail() problem!

  • 29-08-2006 08:34PM
    #1
    Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭


    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, Paid Member Posts: 44,559 Mod ✭✭✭✭Seth Brundle


    is $_POST a valid email address?

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



  • Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭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