Note that there are some explanatory texts on larger screens.

plurals
  1. POemail that my application sends is getting spammed: what's wrong with my headers?
    primarykey
    data
    text
    <p>I'm sending out emails via my PHP application. However, they're getting marked as spam by Gmail. Here's how I'm sending the email (PHP):</p> <pre><code>$headers = "From: test@bookmytakeout.com\r\nReply-To: test@bookmytakeout.com"; $mail_sent = mail( 'munged@gmail.com', 'test mail', $message, $headers, '-ftest@bookmytakeout.com' ); </code></pre> <p>Gmail spams this message. So I went and clicked that handy "show original message" option. Here's what I get:</p> <pre><code>Delivered-To: munged@gmail.com Received: by 10.68.71.200 with SMTP id x8cs325812pbu; Thu, 21 Jul 2011 01:34:52 -0700 (PDT) Received: by 10.236.114.234 with SMTP id c70mr12483739yhh.163.1311237292052; Thu, 21 Jul 2011 01:34:52 -0700 (PDT) Return-Path: &lt;test@bookmytakeout.com&gt; Received: from vps.bookmytakeout.com ([8.22.200.47]) by mx.google.com with ESMTPS id u61si3662037yhm.119.2011.07.21.01.34.50 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jul 2011 01:34:51 -0700 (PDT) Received-SPF: neutral (google.com: 8.22.200.47 is neither permitted nor denied by best guess record for domain of test@bookmytakeout.com) client-ip=8.22.200.47; DomainKey-Status: bad format Authentication-Results: mx.google.com; spf=neutral (google.com: 8.22.200.47 is neither permitted nor denied by best guess record for domain of test@bookmytakeout.com) smtp.mail=test@bookmytakeout.com; domainkeys=neutral (bad format) header.From=test@bookmytakeout.com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bookmytakeout.com; h=Received:To:Subject:From:Reply-To:Message-Id:Date; b=WYWQ+/9+wOAvq+OUSM5KLDAueciIoNiByXaVV29HYa0XbSwm2f+89TCj8pW24G7k1vTGCvR8n64iSwgPQuoEitz6ehbszd0+75Px0WlGsvyeZGrW3PaYEpkRFmkDoaGe; Received: from munged by vps.bookmytakeout.com with local (Exim 4.69) (envelope-from &lt;test@bookmytakeout.com&gt;) id 1QjolW-0001Vn-Us for munged@gmail.com; Thu, 21 Jul 2011 14:07:31 +0530 To: munged@gmail.com Subject: test mail From: test@bookmytakeout.com Reply-To: test@bookmytakeout.com Message-Id: &lt;E1QjolW-0001Vn-Us@vps.bookmytakeout.com&gt; Date: Thu, 21 Jul 2011 14:07:30 +0530 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.bookmytakeout.com X-AntiAbuse: Original Domain - gmail.com X-AntiAbuse: Originator/Caller UID/GID - [1005 1000] / [47 12] X-AntiAbuse: Sender Address Domain - bookmytakeout.com test </code></pre> <p>Now, I have no idea how to diagnose what could be setting off gmail's spam filters. Can someone please point out what part of this email is setting off the spam filter?</p> <p>If possible, please post a solution as well. I'm more interested in learning what's wrong with the headers than in how to fix this for now.</p> <p>PS: I have a few suspicions of my own:</p> <ol> <li>the Received header says "vps.bookmytakeout.com" but the From header says "bookmytakeout.com" - but I tried sending it with From as test@vps.bookmytakeout.com - same problem, still spammed.</li> <li>The headers "Received-SPF", "DomainKey-Status" and "Authentication-Results" seem to indicate some problem. I distinctly remember NOT setting up any MX records for this domain name. Could that be the issue?</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload