gautham Posted February 15, 2010 Share Posted February 15, 2010 Hi everyone, I am a beginner. I had tried sending a mail from wamp server. But this message appeared. "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\book\mailform.php on line 13 Thank you for using our mail form " What port number should I set in php.ini now? Quote Link to comment https://forums.phpfreaks.com/topic/192117-need-help-with-mail-function/ Share on other sites More sharing options...
beansandsausages Posted February 15, 2010 Share Posted February 15, 2010 PHPFreaks.com Questions, Comments, & Suggestions This is NOT a help forum! Discussions about our website should go here. Feature requests, compliments, complaints... whatever you want, just be nice You got the wrong Topic. Quote Link to comment https://forums.phpfreaks.com/topic/192117-need-help-with-mail-function/#findComment-1012490 Share on other sites More sharing options...
cags Posted February 15, 2010 Share Posted February 15, 2010 In order to use localhost you would have to install a mail server on your computer, you would then set the port to whatever port you set your mail server to listen to. It's more likely you don't want to do this, in which case you will need to change the SMTP value and stick to the standard port 25. I know in the UK many ISPs allow you to use their SMTP. Quote Link to comment https://forums.phpfreaks.com/topic/192117-need-help-with-mail-function/#findComment-1012491 Share on other sites More sharing options...
Deoctor Posted February 15, 2010 Share Posted February 15, 2010 check this in ur command prompt telnet localhost 25 if the port is open then it will allow you to send the mail. other wise the only other option left for you is to use the smtp server to send mails.. u can configure the smtp in the php.ini file check this article for your reference http://articles.sitepoint.com/article/advanced-email-php Quote Link to comment https://forums.phpfreaks.com/topic/192117-need-help-with-mail-function/#findComment-1012495 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.