I am using the following code to send mail.
<?php
$Name = "xyz";
$email = "xyz@yahoo.com";
$recipient = "abc@hotmail.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields
ini_set('sendmail_from', 'xyz@yahoo.com'); //Suggested by "Some Guy"
mail($recipient, $subject, $mail_body, $header); //mail command
?>
In php.ini the settings are...
SMTP = smtp.gmail.com
smtp_port = 25
I am getting this error.
Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. a14sm1913669tia.7 in D:\wamp\www\yojoe-web\html\site\mail.php on line 11
Please suggest a solution.
Thanks,
Sachin