n3xtgen Posted April 6, 2011 Share Posted April 6, 2011 I have a form and when a user submits it sends to an email. When I press submit I get this: 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\myPage.php on line 49 I am new to PHP and not sure how to set this up to work on my localhost. I installed WampServer. Thank You Quote Link to comment Share on other sites More sharing options...
betterphp Posted April 8, 2011 Share Posted April 8, 2011 I'm not sure about WampServer but I know XAMPP comes with Mercury for email, do you have anything similar ? Quote Link to comment Share on other sites More sharing options...
snushah Posted April 18, 2011 Share Posted April 18, 2011 IN WAMP Server, Open php.ini file and Search 'mail function' in SMTP= supply your SMTP Address should be like [mail function] ; for Win32 only. SMTP = smtp.myisp.com ;http://php.net/smtp-port smtp_port=25 sendmail_from=xyz@myisp.com Syed Shah http://www.snushah.com Quote Link to comment Share on other sites More sharing options...
mitko29 Posted April 18, 2011 Share Posted April 18, 2011 Yeah this is the best way Quote Link to comment Share on other sites More sharing options...
betterphp Posted April 21, 2011 Share Posted April 21, 2011 That is assuming the ISP provides open SMTP server access. 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.