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 protected]'; $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. Link to comment https://forums.phpfreaks.com/topic/61027-email/ 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 Link to comment https://forums.phpfreaks.com/topic/61027-email/#findComment-303705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.