I really need a quick fix and haven't found any solution to my problem. I want to send email to the user but the sender name always shows Apache.
Here is my coding.
<?php
$password = rand(1000,9999);
$firstname = "syamsul";
$surname = "rizal";
$email = "example@yahoo.com";
$max_id = 3;
//Generate Email
$to = $email;
$subject = "Welcome to ShopOnline!";
$message = "Dear " .$firstname. ", welcome to use ShopOnline! Your Customer id is " .$max_id. " and the password is ".$password.".";
$headers = "From registration@shoponline.com.au" ;
// send mail
mail($to,$subject,$message,$headers, "-r 4914031@yahoo.com");
echo "Thank you for sending us feedback";
?>
And why i can't send this email to gmail account but works to non-gmail account? Thanks in advance!