Advertisements

PHP simple email function

Postby sandhya » Thu Jul 01, 2010 6:35 pm

Offline
sandhya
Posts: 1
Joined: Thu Jul 01, 2010 6:22 pm
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:\Program Files (x86)\wamp\www\progs\mail.php on line 11
Message could not be sent... :?:
This warning occurred while executing the simple mail function example in php tutorial....
Plz giv me a solution........

Postby tutorialspoint » Fri Jul 09, 2010 10:24 pm

Offline
tutorialspoint
Site Admin
Posts: 143
Joined: Fri Apr 27, 2007 6:52 pm
Possibly you are not running a SMTP server on your machine. Check with yoru administrator or try to find out how to setup SMTP server on your windows or unix machine. Once you have this setup properly then PHP program would also work.

Thanks
Moderator, TP
Keep visiting and share this site with your friends.