通过smtp.gmail.com发送的电子邮件被Gmail标记为垃圾邮件

时间:2014-05-10 02:05:29

标签: php email gmail phpmailer spam

我正在使用PHP Mailer从我的网络服务器向用户发送邮件,但我的邮件被标记为垃圾邮件。我已经完成了我的研究,并解决了所有明显的问题:我们通过DKIM,有一个正常工作的SPF,电子邮件文本不是垃圾邮件,我们通过TLS发送。

以下是gmail标记为垃圾邮件的电子邮件标题:

Delivered-To: test.bar.002@gmail.com
Received: by 10.181.12.40 with SMTP id en8csp116861wid;
        Fri, 9 May 2014 18:46:55 -0700 (PDT)
X-Received: by 10.224.6.10 with SMTP id 10mr19706177qax.45.1399686414997;
        Fri, 09 May 2014 18:46:54 -0700 (PDT)
Return-Path: <mailer@mysite.io>
Received: from mail-qg0-x241.google.com (mail-qg0-x241.google.com [2607:f8b0:400d:c04::241])
        by mx.google.com with ESMTPS id v7si2881235qge.66.2014.05.09.18.46.54
        for <test.bar.002@gmail.com>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 09 May 2014 18:46:54 -0700 (PDT)
Received-SPF: pass (google.com: domain of mailer@mysite.io designates 2607:f8b0:400d:c04::241 as permitted sender) client-ip=2607:f8b0:400d:c04::241;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of mailer@mysite.io designates 2607:f8b0:400d:c04::241 as permitted sender) smtp.mail=mailer@mysite.io;
       dkim=pass header.i=@mysite.io
Received: by mail-qg0-x241.google.com with SMTP id i50so1732747qgf.8
        for <test.bar.002@gmail.com>; Fri, 09 May 2014 18:46:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=mysite.io; s=google;
        h=date:to:from:reply-to:subject:message-id:mime-version:content-type
         :content-transfer-encoding;
        bh=n6hX3e1GZ+Q/POR+xMHxvjDK/1rDVqzc9ou8V6y9ytw=;
        b=UwZR6ZGo9UvrlFi7dEvc79EvBcD05JuSiYzKJFmvB/7UDxmavBlFLXamKTnnQjUFOq
         kHL9T/o7nLh19mcZQLRZ+MxRbz4YMEtLnWmWS4H2b+J6LIJprEa5q8lf5dnDtLQkBMB5
         sUG8jxH5JDvGgNZTAszesbzbnFNRYROtNztWM=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:to:from:reply-to:subject:message-id
         :mime-version:content-type:content-transfer-encoding;
        bh=n6hX3e1GZ+Q/POR+xMHxvjDK/1rDVqzc9ou8V6y9ytw=;
        b=hjzBYoeDiPsFfb51gYZy40dfC00g7GkutZ3eLVPl/MVGlmInAAn08wmvjziZBu0x6W
         cZsuvX+Lmvo0CS8xfA7c7WvKEajz8drtfY/4KRdCst4NJAUbygvwtbM+BjlTReYDRs7w
         iG49tFYOGeVtiPDjpmFIiNpTdSqtmigVic5l1MuOzWQvxN2bIHKpu7EBWTmcDpwOQwO6
         wZjTQPp34pRJTVCmI9LxjraoQPEDcF65eQePnw09WwqXB6f4rIhTTdSrqfj7bz0nnC6Y
         1ffFtBxIOlacX4MkeaunqxtrlkrE1/PWiS3TBAtOHGG5WcTbBR6vyYIbc03jNh76jM9Q
         JBWQ==
X-Gm-Message-State: ALoCoQlsyfeiWIDN4lXUnaoJrzWGVWYxtpyEiArI04f/0C180ysTVHSZPeM7kNG0/gv4guEkE0SP
X-Received: by 10.140.28.198 with SMTP id 64mr18697366qgz.49.1399686414621;
        Fri, 09 May 2014 18:46:54 -0700 (PDT)
Return-Path: <mailer@mysite.io>
Received: from mysite.io (iad1-vshost51.dreamhost.com. [208.113.210.253])
        by mx.google.com with ESMTPSA id q8sm9340911qas.5.2014.05.09.18.46.54
        for <test.bar.002@gmail.com>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Fri, 09 May 2014 18:46:54 -0700 (PDT)
Date: Fri, 9 May 2014 18:46:54 -0700
To: test.bar.002@gmail.com
From: Burn After Reading Mailer <mailer@mysite.io>
Reply-To: mailer@mysite.io
Subject: Here's a test subject. 
Message-ID: <110ee4e3922d30540207be948c995d93@mysite.io>
X-Priority: 3
X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Here's a message with innocuous copy.

我有一张与谷歌一起运行的支持票,他们也无法弄明白。我通过SSL连接到端口465的stmp.gmail.com:

$mail = new PHPMailer();
$mail->IsSMTP();                                    
$mail->Host = "smtp.gmail.com";
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "myGmailAccount@gmail.com";       
$mail->Password = "myGmailAccountPassword";  

这是我们在dreamhost上运行的SPF:

v=spf1 ip4:208.113.210.253 include:_spf.google.com ~all

这与标题中显示的IP相同:

Received: from mysite.io (iad1-vshost51.dreamhost.com. [208.113.210.253])

我不知道我在这里缺少什么。我们是否有机会对此进行过多次测试,以至于我们实际上已经让Gmail认为邮件是垃圾邮件,只是因为我们没有将其标记为“非垃圾邮件”?

1 个答案:

答案 0 :(得分:1)

我和你有同样的问题。我使用Gmail SMTP电子邮件回复在线商店。我的电子邮件第一次标记为垃圾邮件。但是一个月后,我要求我的朋友和我的客户将我的在线商店添加到安全列表并标记为非垃圾邮件。它不再通过垃圾邮件箱了。它也发生在雅虎。

最后,请确保您的主题和内容不会触发垃圾邮件(包含垃圾内容)。在这里查看一些垃圾话:http://blog.hubspot.com/blog/tabid/6307/bid/30684/The-Ultimate-List-of-Email-SPAM-Trigger-Words.aspx