Everytime my mail goes to spam in phpmailer

旧时模样 提交于 2019-11-27 09:18:43
ab_dev86

Based on you code i notice that you are sending an email directly from you web page on your domain.

For example you used an @hotmail.com address.

When the recipient receive the emails the mail service of the recipient may test a reverse DNS of the sender of the mail. So the sender is from @hotmail.com but the mail comes from your domain which of course is not hotmail.com.

So I receive a mail from an address @hotmail.com but the IP sender isn't related at all with domain hotmail.com: that's SPAM!

http://en.wikipedia.org/wiki/Reverse_DNS_lookup

I think a possible solution is: in you PHP code use authenticate with SMTP and from there send the mail!

mim

Normally, an email is marked spam if its "From:" header value's domain part does not match the domain that is actually sending the email.

The easiest way to bypass this is to use a "From:" that matches your domain, and use a "Reply-To:" header to the email that you set in "From:" header

For eg: if you are sending mail from mydomain.com and your from email is me@hotmail.com, you should change your headers to this:

From: me@mydomain.com

Reply-To: me@hotmail.com

if this is your full codes then you have to write the path of the PHPMailer thats it.

Ex-

require '/...../PHPMailer-master/class.phpmailer.php';

require '/....../PHPMailer-master/PHPMailerAutoload.php';

require '/......./PHPMailer-master/class.smtp.php';   

the above will help you.

spam filter of Google or Outlook or whichever you use do this automatically. I believe there is no way make the mail go to inbox programmatically. usually this happens because the sending server is already marked as spam by somebody. The way i found is go to the gmail account mark the item as 'important' in gmail and 'Add to Safe senders' in Outlook.

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