Click to See Complete Forum and Search --> : PHP An error in using E-mail function in php


surajjs1987
February 6th, 2011, 10:07 AM
Respected Sir,

As you know that i am studying php . But while studying i have done a php e-mail program . Doing that program i get the output and shows the

output as 'Mail sent'. But a warning was showing like this..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 G:\Xammp\xampp\htdocs\suraj\e_mail.php on line 12 ..

i have try my best to bug this warning but i was failed . I also check on the internet .. they shows some solutions ... i try to do it...





So i request U to help me

PeejAvery
February 6th, 2011, 10:46 AM
PHP's mail() method does not handle errors from the SMTP service because they are separate. You need to properly edit your php.ini configuration file to point to your SMTP server.

surajjs1987
February 11th, 2011, 05:30 AM
how to configure php.ini configuration? I'm using Xampp for doing Php....

PeejAvery
February 11th, 2011, 06:44 AM
Open php.ini and edit the SMTP section.