我使用php从网页发送电子邮件。 Gmail用户会收到此垃圾邮件。 我创建了DNS反转记录和MX记录。 这是电子邮件代码:
Delivered-To: someuser@gmail.com
Received: by 10.204.60.140 with SMTP id p12cs47940bkh;
Thu, 26 Jan 2012 07:12:08 -0800 (PST)
Received: by 10.224.116.201 with SMTP id n9mr3202312qaq.16.1327590727329;
Thu, 26 Jan 2012 07:12:07 -0800 (PST)
Return-Path: <apache@banana-app.com>
Received: from banana-app.com (banana-app.com. [107.6.86.26])
by mx.google.com with ESMTP id t19si1801483qcx.182.2012.01.26.07.12.06;
Thu, 26 Jan 2012 07:12:07 -0800 (PST)
Received-SPF: pass (google.com: domain of apache@banana-app.com designates 107.6.86.26 as permitted sender) client-ip=107.6.86.26;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of apache@banana-app.com designates 107.6.86.26 as permitted sender) smtp.mail=apache@banana-app.com
Received: from banana-app.com (banana-app.com [127.0.0.1])
by banana-app.com (8.13.8/8.13.8) with ESMTP id q0QFC64q013520
for <someuser@gmail.com>; Thu, 26 Jan 2012 10:12:06 -0500
Received: (from apache@localhost)
by banana-app.com (8.13.8/8.13.8/Submit) id q0QFC6Rq013519;
Thu, 26 Jan 2012 10:12:06 -0500
Message-Id: <201201261512.q0QFC6Rq013519@banana-app.com>
To: someuser@gmail.com
Subject: Password Recovery
X-PHP-Originating-Script: 0:Sendmail.php
From: info <info@banana-app.com>
Reply-To: info@banana-app.com
Date: Thu, 26 Jan 2012 17:12:06 +0200
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
MIME-Version: 1.0
=0A Hello,=0A <BR/>=0A You=
recently requested to reset the password for your account.=0A =
<BR/>=0A Banana=0A
有人可以帮我找到问题吗?
答案 0 :(得分:1)
您可以考虑使用SwiftMailer等库。在这样的图书馆中,开发人员已经对诸如防止被标记为垃圾邮件之类的主题进行了大量思考,因此这可能会解决您的问题。
答案 1 :(得分:1)
许多电子邮件提供商会将包含HTML内容的电子邮件检测为垃圾邮件。 再次尝试使用电子邮件正文中的简单文本来消除此选项。