2

Every mail sent with the PHP Mail() is getting sent straight to spam (all providers e.g. gmail, yahoo, hotmail)

My IP is not blacklisted.

Here is an example of an email header that got sent to spam:

Delivered-To: [email protected]
Received: by 10.229.91.149 with SMTP id n21cs189229qcm;
        Mon, 26 Dec 2011 17:43:12 -0800 (PST)
Received: by 10.43.117.194 with SMTP id fn2mr27050431icc.53.1324950190711;
    Mon, 26 Dec 2011 17:43:10 -0800 (PST)
Return-Path: <[email protected]>
Received: from host.avatarthelastairbenderonline.com 

(host.avatarthelastairbenderonline.com. [173.199.171.80])
        by mx.google.com with ESMTPS id ut2si17526443igc.26.2011.12.26.17.43.10
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 26 Dec 2011 17:43:10 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of [email protected] designates 173.199.171.80 as permitted sender) client-ip=173.199.171.80;
DomainKey-Status: bad format
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of [email protected] designates 173.199.171.80 as permitted sender) [email protected]; domainkeys=neutral (bad format) [email protected]
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=avatarthelastairbenderonline.com;
    h=Received:Date:To:From:Subject:Message-ID:X-Priority:X-Mailer:MIME-Version:Content-Transfer-Encoding:Content-Type:X-Source:X-Source-Args:X-Source-Dir;
    b=p8We0ql3qPoF6Jk79NICVgnMedJR6xGsnBQPp0q/0h+NCY2YdtUh7ouRKNEcpAhXNr+OKzs2XWd37fn86sLcrC0tWUGXU0JUeyktyGYpNOoTeI9ImFlrD3Vt1VDQ+JXr;
Received: from host.avatarthelastairbenderonline.com ([173.199.171.80] helo=avatarthelastairbenderonline.com)
    by host.avatarthelastairbenderonline.com with esmtpsa (TLSv1:AES256-SHA:256)
    (Exim 4.69)
    (envelope-from <[email protected]>)
    id 1RfM4K-0001Yg-Bz
    for [email protected]; Mon, 26 Dec 2011 19:43:08 -0600
Date: Tue, 27 Dec 2011 01:43:08 +0000
To: [email protected]
From: Avatar The Last Airbender <[email protected]>
Subject: Test message from your WordPress blog
Message-ID: <3bfb7466ba93540ac86be00e3792e30b@avatarthelastairbenderonline.com>
X-Priority: 3
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - host.avatarthelastairbenderonline.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - avatarthelastairbenderonline.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 

Hi, this is the Configure SMTP plugin e-mailing you a test message from your WordPress blog.

This message was sent with this time-stamp: 2011-12-26 19:43:08

Only think I can see is it says that the DomainKey-status says bad format.

What is the domain key? and would it send emails to spam?

Can anyone tell why these emails are being sent to spam?

Even the basic Contact Form 7 Wordpress plugin is sending emails straight to spam.

2
  • Is this the case with multiple recipients or have you only observed this on this gmail account so far? In other words, have you tried having it sent to a different email account? Also, it seems that if the domain key is bad, Gmail usually blocks the email completely. I'm not sure what bad format means. Last of all, you may want to reconsider posting your email address. It's not necessary in this case for someone to answer the question. Commented Dec 27, 2011 at 6:43
  • 1
    I've tested several gmail accounts, all of them filter it out as spam. I've created fresh gmail accounts for testing purposes.
    – Talon
    Commented Dec 27, 2011 at 7:25

1 Answer 1

0

DomainKeys Identified Mail (DKIM) lets an organization take responsibility for a message that is in transit. The organization is a handler of the message, either as its originator or as an intermediary. Their reputation is the basis for evaluating whether to trust the message for further handling, such as delivery. Technically DKIM provides a method for validating a domain name identity that is associated with a message through cryptographic authentication. (Source: http://www.dkim.org/)

Contact Form 7 plugin is sending emails to spam because internally it is also using the same SMTP mechanism to send the email originating from your host machine. Sending email from your own host is not a good idea for the problems you are facing.

You can solve this by using an SMTP server which supports DKIM. You can use one of these two options: (I am sure there are other ways as well)

  1. Use Gmail as your SMTP server. (Help: http://lifehacker.com/111166/how-to-use-gmail-as-your-smtp-server) You can sign up for google apps and use your domain name with gmail as well.
  2. Use amazon SES to send your emails. They recently started SMTP authentication as well. You may be charged nominally for this.
4
  • I used Gmail as my SMTP server temporarily and it worked great. However I also send out several notification emails (notifying them of replies to forum topics etc.. kind of like how stackoverflow notifies me of answers) any how Google's SMTP didn't like the auto emails and after about 20 emails it stopped sending from that email as the SMTP server. Do you think Amazon can handle sending multiple email notifications like that per day? Also it seems like there should be a way to use my existing server to send these emails via SMTP is that possible?
    – Talon
    Commented Dec 27, 2011 at 11:20
  • If you will send from your servers - the delivery will be unpredictable. Amazon SES was meant for this only. I know for sure that amazon can handle your use case pretty well - as I use it myself.
    – Vikash
    Commented Dec 27, 2011 at 13:22
  • Hmm yeah i'm testing out Amazon right now, they are way cheap, and seem to be super reliable. Now I just need to figure out how to make every PHP mail() use SMTP via Amazon, because a lot of plugins have the mail() hard-coded in.
    – Talon
    Commented Dec 27, 2011 at 19:47
  • millcreeksys.com/2011/01/28/… - This will help.
    – Vikash
    Commented Dec 28, 2011 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.