phpSensei Posted July 20, 2007 Share Posted July 20, 2007 Why do i keep getting this error: 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:\wamp\www\project_upload\register.php on line 192 $to = '$email@hotmail.com'; $subject = "Your Account Information"; $body = "You have sucessfully registered at my localhost host"; if (mail($to, $subject, $body)) { echo("<p>Account information has been sent to your email!</p>"); } else { echo("<p>Message delivery failed...</p>"); } But never works, please help me out. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 20, 2007 Share Posted July 20, 2007 this is a setting in your php.ini file..... there is a line SMTP = xxxxx you need to put the xxxx to your service providers smtp server I am with virginmedia (formally telewest) so mine reads smtp.blueyonder.co.uk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.