How do I set up PHP mail?

Tanmay

New member
When ever I try to use the mail function, it gives me this error:

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:\Users\Tanmay\xampp\htdocs\testmail.php on line 7
Mail Sent.

I don't get it. I've read several things that say I have to change the php.ini and put my ISP for the SMTP or something, but I don't get it...

I've even tried a few times, and it hasn't worked, even when I change the SMTP to my ISP, and set my email address for the sendmail_from and I've even changed my port to Yahoo!'s port, Gmails port, and my ISP's port... It's so frustrating!!!!

Please explain clearly... If what you say works, I would like to give you a lot more than just a best answer, as I have been struggling with this extremely frustrating problem for a week now, and I'm really annoyed. But, of course, all I can give you is a best answer!

BTW, my ISP is Comcast (in case it matters)!
 
Back
Top