lalarukh12 Posted August 9, 2012 Share Posted August 9, 2012 hi, i tried to send an email through a php code as given in the book but following error occured 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:\xampp\htdocs\email.php on line 47 i tried to fix it by trying alot of things searching from internet but can't solve . Link to comment Share on other sites More sharing options...
Edward Posted August 9, 2012 Share Posted August 9, 2012 Probably better to get it working on a live host, you can get the localhost to send emails but its a lot of work setting it up. Have you got a live server to test on? Link to comment Share on other sites More sharing options...
lalarukh12 Posted August 9, 2012 Author Share Posted August 9, 2012 i ve got xampp installed and murcury too. Link to comment Share on other sites More sharing options...
HartleySan Posted August 9, 2012 Share Posted August 9, 2012 Unless you're willing to take the time to set up your mail server, don't do it on XAMPP. It's better to test on a real server like Edward said. Link to comment Share on other sites More sharing options...
lalarukh12 Posted August 9, 2012 Author Share Posted August 9, 2012 i tried it on mercury it is a mail server ? Link to comment Share on other sites More sharing options...
HartleySan Posted August 9, 2012 Share Posted August 9, 2012 Yes, Mercury is the mail server, but you're not listening to us. Setting up the mail server in XAMPP is complicated. If you want to do that, search Google for your answer. No one here can help you with that. We're advising you to not bother with the XAMPP mail server. If you want to use a mail server, use one on a live hosting site. Link to comment Share on other sites More sharing options...
lalarukh12 Posted August 9, 2012 Author Share Posted August 9, 2012 ok.... i setup the mail server as given in this forum and it worked. thanks alot. Link to comment Share on other sites More sharing options...
Recommended Posts