Authentication Required error while sending email using PHP -


i trying send email using following php code.but following error:

warning: mail(): smtp server response: 530-5.5.1 authentication required. learn more @ 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257

<?php     $to = "jaynanavati@gmail.com";     $subject = "test mail";     $message = "hello! simple email message.";     $from = "jaynanavati@gmail.com";     $headers = "from:" . $from;     mail($to,$subject,$message,$headers);     echo "mail sent."; ?> 

it pretty obvious smtp server requires authenticate. use more powerful tool sending mail, such phpmailer.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -