I'm new to PHP.
I want to send email from php. Simple mail.
my smtp setting is as http://184.73.234.224/test.php
In my view my smtp setting is not correct so that my mail is not going.
my php code is
Code: Select all
<?php
$from_name = "Gar";
$from_email = "gar@sify.com";
$subject = "testing mail";
$contents = "Hello how r u.";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=windows-874\n";
$headers .= "From: ".$from_name."<".$from_email.">\n";
$headers .= "Reply-To: ".$from_email."\r\n";
$mail_sent = mail("manish8n@yahoo.co.in",$subject,$contents, $headers);
echo $a = $mail_sent ? "Mail sent" : "Mail failed";
error_log($a,0);
?>