My website emails are going to Spam in gmail [duplicate]

爱⌒轻易说出口 提交于 2020-01-03 01:50:09

问题


I have a web site that provides daily real estate updates. Users register, and we send them an email every day. However, Gmail is marking all of our emails as spam. What should we be looking out for?


回答1:


Spam emails are based on Server, domain and blacklist history.

This is controlled by the Service Provider there is not a lot you can do to be honest.

The best thing is is to add the sender email to your safe list i.e. no-reply@example.com




回答2:


Due to the simplicity of PHP, it is very easy to send a mail through mail(), however there is 99% of chances that you are doing it wrong. You need to follow the right guidelines to use mail(). My recommendation is use a third party mail service like Mandrill

If you still choose to go ahead with php mail(), please follow the below guidelines, which will help you to certain extend.

Set the right Headers:

 $headers .= 'From: YourLogoName info@domain.com' . "\r\n" ;
 $headers .= 'Reply-To: '. $to . "\r\n" ;
 $headers .='X-Mailer: PHP/' . phpversion();
 $headers .= "MIME-Version: 1.0\r\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

 $to = to@hello.com;
 $subject = subject ;
 $body = "<div> Email body goes here.. </div>";  
 mail($to, $subject, $body,$headers);

Message Sender Domain and Server Domain Should Match

Spammers are notorious for sending emails from one server and trying to make the recipient believe that it came from somewhere else. So if you are sending an email from sender@yourdomain.com, it is a good idea the the script reside on example.com.

The Server is not Blacklisted

When a server is blacklisted, it means that that server has identified as one that has been sending a lot of spam. This results in recipient mail servers rejecting or filtering any mail that is received from that server.



来源:https://stackoverflow.com/questions/33691210/my-website-emails-are-going-to-spam-in-gmail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!