hello,
below script is working you can use script and test on server change email address.
Actually you are not mentioned message format in header section .
please test script and let me known....
Thanks & Regards
Rakesh
<?php
ini_set("SMTP","localhost");
ini_set("sendmail_from","[email protected]");
$glb_str_admin_mail ='[email protected]';
$to = '[email protected]'; // put your own email address
$subject = 'testmail by rakesh';
$headers = "Content-Type: text/html; charset=utf-8\r\n" ."Content-Transfer-Encoding: 8bit\r\n\r\n";
// $headers = "From: ".$glb_str_admin_mail."\r\n";
$headers = "From:". $glb_str_admin_mail . "\r\n" .
"Reply-To:". $glb_str_admin_mail . "\r\n" .
'X-Mailer: PHP/' . phpversion();
// write message
$message = 'hello testing mail by rakesh in html format fro rakesh local machine';
mail($to,$subject,$message,$headers);
echo "sucessss";
exit;
?>
Enter your message below
Sign in or Join us (it's free).