Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

PHP - mail() problem!

  • 29-08-2006 09: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,040 Mod ✭✭✭✭Seth Brundle


    is $_POST a valid email address?


  • 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