if you have configured your web server (apache?) correctly it is possible. Can you give some more information about server configuration?

if you have configured your web server (apache?) correctly it is possible. Can you give some more information about server configuration?

SMTP is localhost
smtp port is 25

I try to send an email with the above configuration i got the following 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\sheeja_works\bv\mail\mail3.php on line 20

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\sheeja_works\bv\mail\mail3.php on line 22
Cannot Send Email

Next time i try the following program that time also i got error

Can you please help me to rectify the error

ini_set("SMTP","smtp.mail.yahoo.com");
ini_set('smtp_port','587');
// send e-mail to ...
$to="sheejaanna@gmail.com";

// Your subject
$subject="Test";

// From
$header="from: sheeja <sheeja_anna@yahoo.co.in>";

// Your message
$message="Hello \r\n";
$message.="This is test\r\n";
$message.="Test again ";

// send email
$sentmail=mail($to, $subject, $message, "From: $header\nReply-To: $header\nContent-Type: text/html;
8");

$sentmail = mail($to,$subject,$message,$header);

// if your email succesfully sent

if($sentmail){
echo "Email Has Been Sent ";
}
else {
echo "Cannot Send Email ";
}

?>


Warning: mail() [function.mail]: SMTP server response: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html in c:\wamp\www\sheeja_works\bv\mail\mail3.php on line 20

Warning: mail() [function.mail]: SMTP server response: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html in c:\wamp\www\sheeja_works\bv\mail\mail3.php on line 22
Cannot Send Email

This article has been dead for over six months. Start a new discussion instead.