I am trying to send an email through a web form but I am getting an error...... 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:\wamp\www\sendmail.php on line 19 Can someone tell me how to fix this? If this is my mail server not running problem, can anyone teach me how to on the mail server?? Waiting for u all reply. Thanks.
You cannot test PHP scripts on your computer unless you have PHP installed, configured and set up. The same thing would be with a SMTP server. I would suggest finding a free host that allows both "SENDMAIL" and "PHP" just specifically for testing.
Edit your php.ini file and change the SMTP server configuration to point to your ISP's SMTP server (the same SMTP settings you put in Outlook/Thunderbird).
Last 2 week actually my email function is no problem. But dunno why, the warning came out since last week. I dunno where got the problem. I am using XAMPP.
Without viewing your email script or your configuration files I can help you no further. I would suggest back-tracking your edits and changes until you have it working again (meaning if you changed "red" to "blue" change it back to "red" and see if it is working or not.)
I already change the SMTP server configuration same with Outlook. But dunno why last week the warning came out. Got any suggestion or solution???
What was the last thing you remember editing before it broke, change that back and see if it works. Remember to make daily backups for such an event.
I think my coding is no problem. I would like to ask got any setting is need to change at the server to enable sending email?? I not so sure with the setting at server there. Can anyone help???
The best thing you could do to ensure it is not the settings is first, save everything, then reinstall XAMPP in either a different directory or over the old/previous install location, then try the script again.