interloper Posted March 18, 2009 Share Posted March 18, 2009 I JUST started with php and and having some mail problems. When I click a button I am supposed to get a confirmation page and an email to my email account. Instead I get a confirmation page with: 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() ... I am using my own computer as the server rather than uploading it to another server. My php.ini file reads: SMTP = localhost smtp_port = 25 Any suggestions? --interloper Quote Link to comment https://forums.phpfreaks.com/topic/150060-solved-noob-mail-help/ Share on other sites More sharing options...
waynew Posted March 18, 2009 Share Posted March 18, 2009 You wont be able to send via your localhost unless you've been set up to do so. Quote Link to comment https://forums.phpfreaks.com/topic/150060-solved-noob-mail-help/#findComment-788071 Share on other sites More sharing options...
interloper Posted March 18, 2009 Author Share Posted March 18, 2009 So do I have to change "localhost" to my isp name? Quote Link to comment https://forums.phpfreaks.com/topic/150060-solved-noob-mail-help/#findComment-788079 Share on other sites More sharing options...
waynew Posted March 18, 2009 Share Posted March 18, 2009 This could enlighten you more. Quote Link to comment https://forums.phpfreaks.com/topic/150060-solved-noob-mail-help/#findComment-788081 Share on other sites More sharing options...
trq Posted March 18, 2009 Share Posted March 18, 2009 So do I have to change "localhost" to my isp name? Not if your isp uses authenticated connections. You'll need to install a mail server locally or use something like phpmailer so you can cannect to a server using authentication. Quote Link to comment https://forums.phpfreaks.com/topic/150060-solved-noob-mail-help/#findComment-788084 Share on other sites More sharing options...
interloper Posted March 18, 2009 Author Share Posted March 18, 2009 SOLVED. I changed my SMTP in my php.ini file to my isp (mail.isp.com, then I stopped and restarted my Apache server and all of a sudden I got the right confirmation page and the email in my account! Thanks to those of you who were so quick to reply! You have my appreciation! --interloper Quote Link to comment https://forums.phpfreaks.com/topic/150060-solved-noob-mail-help/#findComment-788100 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.