1

I am using wampdevloper for php .when i try to use mail() function it shows me error

Warning: mail(): Failed to connect to mailserver at "127.0.0.1" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\WampDeveloper\Websites\localhost\webroot\test1.php on line 9

what should i do for send email from localhost.

Machavity
  • 30,841
  • 27
  • 92
  • 100
  • You can't. You need an SMTP with a FQDN (unless you set up your local host a relay, lots of work involved) – mituw16 Aug 05 '16 at 13:06
  • what is FQDN from where i can get it. –  Aug 05 '16 at 13:07
  • should i use wampserver ,. for that i think their is easy solution . –  Aug 05 '16 at 13:10
  • https://www.google.com/#q=fqdn – mituw16 Aug 05 '16 at 13:10
  • i don't want to buy a domain now . that's why i am trying it on localhost. –  Aug 05 '16 at 13:13
  • 1
    You can't just setup an email server. Most residential ISPs block the necessary ports, since hijacked computers often send email. You'll have to find an established mail server to send your email – Machavity Aug 05 '16 at 13:14
  • their are many solution for wampserver. are they all fake.http://stackoverflow.com/questions/22396721/how-to-send-email-from-localhost-wamp-server-to-send-email-gmail-hotmail-or-so-f –  Aug 05 '16 at 13:17
  • @nikhil all of the solutions for wampserver assume that you have a FQDN (which is required to host an SMTP server) – mituw16 Aug 05 '16 at 13:21
  • ok thanks. however i will try those solution. –  Aug 05 '16 at 13:30

0 Answers0