Bypass Gmail's spam filter (mails sent with PHP from a shared host)

前端 未结 5 1356
轮回少年
轮回少年 2020-12-24 14:54

TL;DR: Mails sent from shared hosting (such as a cheap domain from Unoeuro or One.com) end up in spam. How to fix?


I made a mail-system, that

5条回答
  •  旧时难觅i
    2020-12-24 15:15

    There are at least two "spammy" looking things that jump out of your email headers:

    Message-Id: <51450f37.6a0b700a.6239.5dbcSMTPIN_ADDED_MISSING@mx.google.com>
    

    Notice the SMTPIN_ADDED_MISSING section? You aren't behaving like a proper mailer and generating a unique Message-ID. You might find reading RFC 5322 to be instructional.

    Received: from localhost.localdomain (srv18.one.com [193.202.110.18])
    by mail-out2.b-one.net (Postfix) with ESMTP id F3D0B10365
    for ; Sun, 17 Mar 2013 01:32:53 +0100 (CET)
    

    That initial received header has an illegal HELO hostname (localhost.localdomain). Your mailer app should provide a way for you to set that to a valid value. It might even be as easy as configuring the hostname of the machine running PHP. See RFC 1035 (hostname validity), RFC 2821 (SMTP) and RFC 5321 (SMTP).

提交回复
热议问题