0

I am using WAMP and testing my form to see whether it sends to the specified email. It comes up with this error.

Warning: 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\process.php on line 56

Line 56 is this:

if (mail($to, $subject, $message)):

Any idea to why this message is appearing?

Patrick McDermott
  • 1,220
  • 1
  • 15
  • 30
  • it is normal as you do not have any mail server. search on the web for free software for this purpose (windows) – Asad Nauman Jul 29 '15 at 12:01
  • ahhhh. I was going insane. Any recommendations or will any suffice?? – Patrick McDermott Jul 29 '15 at 12:03
  • possible duplicate of [Failed to connect to mailserver at "localhost" port 25](http://stackoverflow.com/questions/4532486/failed-to-connect-to-mailserver-at-localhost-port-25) – D4V1D Jul 29 '15 at 12:06
  • 1
    Look at [phpMailer](http://phpmailer.worxware.com/) for a PHP solution. Or you could install a mailserver, but that will only work for internal testing as nobody will except mail form your mail server as it is an unknown quantity – RiggsFolly Jul 29 '15 at 12:19

0 Answers0