send mail problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

send mail problem

Post by adsegzy »

I designed a form to be sent to some email addresses after is it submitted. but when ever i the submit button is clicked i always receive this message;
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\myproject\products\show_interest.php on line 244
i added php.ini file like below but it is not working
output_buffering on
i also used .htaccess
PHP_FLAG output_buffering on
what can i do?
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: send mail problem

Post by Jade »

You usually get that error if your mail server isn't turned on, if you don't have access to the port, or if your mail server happens to be running on a different port in which case you'd need to update your php.ini to use the correct one.
Post Reply