简体   繁体   中英

Emails sent through smtp.gmail.com marked as spam by Gmail

I'm using PHP Mailer to send mail from my webserver to users, but my messages are marked consistently as spam. I've done my research, and fixed all the obvious issues: we pass DKIM, have a working SPF, the email text isn't spammy, and we're sending through TLS.

Here's the header of an email that gets marked as spam by 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.

I have a running support ticket with Google, and they haven't been able to figure it out either. I'm connecting to stmp.gmail.com with port 465 through SSL:

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

Here's the SPF we have running on dreamhost:

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

That's the same IP that's seen in the header:

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

I don't know what I'm missing here. Is there a chance that we've tested this so many times that we've actually trained Gmail to think the messages are spam, just because we haven't marked them as 'not spam'?

I've had the same problem with you. I make online shop with Gmail SMTP email reply. My email mark as spam at first time. But after a month, I'm asking my friends and my customer to add my online shop to safe list and mark as Not Spam. It's not going through Spam box any more. It also happens with Yahoo.

And lastly, make sure your subject and contents do not trigger spam (have spammy words). Take a look some spammy words here: http://blog.hubspot.com/blog/tabid/6307/bid/30684/The-Ultimate-List-of-Email-SPAM-Trigger-Words.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM