Im trying to test my email form for my web site on my computer, and I get an error when trying to use the mail function. Here it is, I understand perfectly what it is saying, but I have no idea what I should be editing in php.ini and will I have this problem when I upload it to my server? 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\xampp\contact.php on line 9 Code (markup):
Most ISP's block port 25 outgoing, I'm assuming this is what's happening. You shouldn't have the issue when you use an actual hosting service or dedicated server, where port 25 is not blocked (unless the host limits this).
Just tested it online, it works fine, I guess I'll just give localhost a miss when testing my forms for now on. Thanks.
OK, I suppose I would have to download some piece of software to set one up I am guessing, or am I missing something extremely obvious?
yes. download one. no. the error message you posted is saying "can't find the mail server" in its own way. Works from web, but not locally supports the assumption. Didn't say what OS your computer is running though I'm sure one can be found via google. But, really, is it worth the effort? If it works on your computer isn't a real issue. Now working on the web, that's enough story. I believe x-mail was a free SMTP mail server for windows and it works good enough but it was years ago I used it. Was x-mail, still around : http://www.xmailserver.org/
Yes I agree, as long as its gonna work on my site in the end, theres really no need making it run on my computer. Thanks anyway everyone.