php mail function: legitimate mails marked as spam by gmail and hotmail

后端 未结 2 590
日久生厌
日久生厌 2020-12-03 19:13

My website sends emails to users using the PHP mail function. Hotmail and Gmail users don\'t receive them, or they end up in SPAM-folder. Here is the header of a message mar

2条回答
  •  隐瞒了意图╮
    2020-12-03 19:48

    Try using google apps and setting up the spf record, going to setting -> security and setting up the txt dkim key. Then setup the mx records, etc. do all of this on a subdomain of your domain (eg, int.domain.com) and then use smtp to send the mail from phpmail after signing into the account in google, clicking the settings button on right, click settings, php/imap, and enabling both.

    This always works for me and they never get marked as spam because they come from google's servers and have a valid header, return path, sender, smtp, spf record, txt dkim record, mx records, etc.

    Try that out and let me know if it works :)

提交回复
热议问题