Reputation: 23
I am sending mail from my hosting server through this PHP code :
mail("[email protected]", "Subject: Verify Eg Net Solution ID", $randStr , "From: [email protected]" );
In [email protected]
the email is send but there is a warning that is saying :
"This message may not have been sent by: [email protected] Learn more Report phishing"
What I have to do in my hosting domain server. I will really appreciate you if you can give me a solution.
Upvotes: 1
Views: 3097
Reputation: 5737
Check this answer:
You can either set up google apps for your site and get a [email protected] gmail account (more info here it's free), or You will need to set up an e-mail address on your current server that is [email protected] and use that as the $mail->from address.
Your E-Mail recipients are receiving the message because you are telling google to send an e-mail from your server, and then you are telling them that the mail is coming from gmail, which it isn't, it's coming from your personal server. Since the from address and your server address don't match, they flag it as spam. This is googles way of preventing spam, to them it would be the same if you put $mail->from([email protected]). The e-mail would still send, but your domain name does not match the @ address.
Upvotes: 2