How to avoid my mails sent from PHP mail() being marked as spam?

前端 未结 2 1149
醉酒成梦
醉酒成梦 2021-01-05 12:06

I\'m using the following to send registration e-mails:

$subject = \'subject is here\';
$message_raw = \'e-mail text\';

$message = base64_encode($message_raw         


        
相关标签:
2条回答
  • 2021-01-05 12:38

    The php mail() function has nothing to-do with your emails being marked as spam.

    That an email is being marked as spam happens on the other end. You can not influence the process much with mail() - as it's the other end.

    There can be thousand of reasons why an email is being marked as spam, and as long as you don't know the concrete reason why your email is being marked as spam, you can do nothing against that.

    There is a whole industry which makes a living of that btw.

    0 讨论(0)
  • 2021-01-05 12:54

    you may need a reverse dns record for your server.

    many mail servers considers that mails sent from a host are spam if the hostname cannot be looked up. that is nslookup papa.sk should return an ip address, and nslookup <ip address> should return papa.sk.

    0 讨论(0)
提交回复
热议问题