0

I tried php mail fuction to send an email but its giving me the following warning and email not receiving

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().Kindly help me to sort out this problem.

irteza
  • 1
  • Post your code to see your configuration (smtp, port, etc.). – Jose Manuel Abarca Rodríguez May 03 '16 at 21:32
  • Please provide more background info: what mail server are you working with, your mail params, etc. – Webomatik May 03 '16 at 21:32
  • 1
    windows localhost - do you have a mail server installed (i best you a $ you dont) –  May 03 '16 at 21:36
  • Windows does not have a mail server installed by default. The PHP `mail()` functions only sends mail to a configured mail server, it does not actually send mail. You will have to install a mail server or use something like the phpMailer library – RiggsFolly May 03 '16 at 23:58

0 Answers0