I read a lot of threads on here but im still confused about setting up the mx record correctly for google. I have a google mail account and they say the mx record must be set up to:
1 ASPMX.L.GOOGLE.COM
5 ALT1.ASPMX.L.GOOGLE.COM
5 ALT2.ASPMX.L.GOOGLE.COM
10 ASPMX2.GOOGLEMAIL.COM
10 ASPMX3.GOOGLEMAIL.COM
Since one can only setup one mx record on Freehostia, I took the first one. However, the following php test script does not send the email as expected although it displays: "Mail sent".
Code:
<?php
$to = "someone@yahoo.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "myemail@gmail.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
Whats wrong here? The script? Or the mx record or anything else? Have I still to do something special with my google account? What about setting smtp.googlemail.com in the mx record? Thanks for any help.