PHP simple email function

Discussion on PHP Scripting
no avatar
Posts: 1
Joined: Thu Jul 01, 2010 6:22 pm

PHP simple email function

by sandhya » Thu Jul 01, 2010 6:35 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........

no avatar
Site Admin
Posts: 144
Joined: Fri Apr 27, 2007 6:52 pm

by tutorialspoint » Fri Jul 09, 2010 10:24 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.

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

Return to PHP Script