Gmail sends email to spam. All other email clients work perfect

Here is one of my emails.

Delivered-To: jason@gmail.com
Received: by 10.204.57.134 with SMTP id c6cs22321bkh;
Tue, 13 Sep 2011 07:23:32 -0700 (PDT)
Received: by 10.101.168.12 with SMTP id v12mr3751263ano.48.1315923810914;
Tue, 13 Sep 2011 07:23:30 -0700 (PDT)
Return-Path: <contact@big.com>
Received: from big.com (big.com [173.0.59.100])
by mx.google.com with ESMTP id c19si889696anj.173.2011.09.13.07.23.29;
Tue, 13 Sep 2011 07:23:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of contact@big.com designates 173.0.59.100 as permitted sender) client-ip=173.0.59.100;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of contact@big.com designates 173.0.59.100 as permitted sender) smtp.mail=contact@big.com; dkim=neutral (body hash did not verify) header.i=@big.com
Received: by big.com (Postfix, from userid 33)
id 1BDCE2F4041A; Tue, 13 Sep 2011 10:23:20 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=big.com; s=mail;
t=1315923800; bh=ysNGlrscqmqCPbqxJlWWHLaW3SU6MgDVQCze+cevPS4=;
h=To:Subject:Message-ID:Date:MIME-Version:Sender:From:Reply-To:
Content-Type;
b=PDPCRvKGQRP3LeeDNhZQwbX6aMXOZEyqRXV1E+kuDDq05NYRIrmJCcQRhwEIaSosh
yoZ0pF5wtrXjgY1KA0hgee7qzSVDhweguBfOydn1qE6nsL1pq CQgsHmtvu9dwPGw9z
uUEHM9bg5DwiG0RT5KLYf4oZTJmJpc8n2oyK26/I=
To: jason@gmail.com
Subject: Closed Beta Invitation from Jason Gordon
Message-ID: <87847890-050333@big.com>
Date: Tue, 13 Sep 2011 10:38:17 -0400
MIME-Version: 1.0
X-Mailer: PHP-5.3.8
X-Sender: “big” <contact@big.com>
X-Priority: 3
Organization: big
Errors-To: contact@big.com
Sender: contact@big.com
From: “big” <contact@big.com>
Reply-To: “big” <contact@big.com>
Content-Type: multipart/alternative; boundary=87847890

–48673093
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<a href=“http://big.com/u/jasonGordon?utm_source=beta_invite&utm_medium=email&utm_content=referer_name&utm_campaign=join_beta” alt=“Jason Gordon’s profile” title=“Jason Gordon’s profile”>Jason Gordon</a> invited you to join the newest community of entreprenuers and investors, big.

Why participate in our closed beta? Here you will be able to find, research and connect with entrepreneurs or investor so much easier than ever before.

You will be one of the first people to ever lay eyes on our exclusive software!

Sign up by clicking <a href=“http://big.com/join?9b782e=&key=7RG5poe9lgxmUSIcQTPji8EtFMnXyOYW3Cf&utm_source=beta_invite&utm_medium=email&utm_content=sign_up&utm_campaign=join_beta” title=“big Beta Referral”>here</a>

If the link does not work, go to <a href=“http://big.com” title=“big”>big.com</a>, click “Join big” and enter your closed beta access key.

Your closed beta access key is: 7RG5poe9lgxmUSIcQTPji8EtFMnXyOYW3Cf

Please leave us feedback so that we can improve our software.

big Team

–48673093
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8” />
<title>Closed Beta Invitation</title>
</head>
<body>
<table width=“500px” cellspacing=“0” cellpadding=“13” style=“border: 1px solid #e7e7e7;”>
<tr>
<td>
<table cellspacing=“0” cellpadding=“5” bgcolor=“#ffffff” width=“480px” style=“border: 1px solid #999999;”>
<tr>
<td bgcolor=“#489fcc” cellspacing=“15” style=“border-bottom: 1px solid #999999; border-top: 0; border-left: 0; border-right: 0; font-family: verdana; letter-spacing: 1px; font-weight: bold; color: white;” width=“480px”>
big
</td>
</tr>
<tr>
<td>
<table style=“line-height: 26px; font-family: arial; font-size: 13px;” width=“100%” cellspacing=“10” cellpadding=“0”>
<tr>
<td width=“100%”>
<table style=“line-height: 26px; text-align: justify;” width=“100%” cellpadding=“0” cellspacing=“0”>
<tr>
<td width=“100%”>
<a href=“http://big.com/u/jasonGordon?utm_source=beta_invite&utm_medium=email&utm_content=referer_name&utm_campaign=join_beta” alt=“Jason Gordon’s profile” title=“Jason Gordon’s profile”>Jason Gordon</a> invited you to join the newest community of entreprenuers and investors, big.

                                      Why participate in our closed beta? Here you will be able to find, research and connect with entrepreneurs or investor so much easier than ever before.
                                      
                                      You will be one of the first people to ever lay eyes on our exclusive software!
                                   &lt;/td&gt;
                                &lt;/tr&gt;
                             &lt;/table&gt;
                          &lt;/td&gt;
                       &lt;/tr&gt;
                       &lt;tr&gt;
                          &lt;td align="center" width="100%"&gt;
                             &lt;table style="border-top: 1px solid #b8b8b8; border-bottom: 1px solid #b8b8b8;" width="100%" cellpadding="0" cellspacing="5"&gt;
                                &lt;tr&gt;
                                   &lt;td width="100%" align="center"&gt;
                                   Sign up by clicking &lt;a href="http://big.com/join?9b782e=&key=7RG5poe9lgxmUSIcQTPji8EtFMnXyOYW3Cf&utm_source=beta_invite&utm_medium=email&utm_content=sign_up&utm_campaign=join_beta" title="big Beta Referral"&gt;here&lt;/a&gt;
                                   &lt;/td&gt;
                                &lt;/tr&gt;
                             &lt;/table&gt;
                          &lt;/td&gt;
                       &lt;/tr&gt;
                       &lt;tr&gt;
                          &lt;td width="100%" style="text-align: justify;"&gt;
                             If the link does not work, go to &lt;a href="http://big.com" title="big"&gt;big.com&lt;/a&gt;, click "Join big" and enter your closed beta access key.
                             
                             Your closed beta access key is:
                          &lt;/td&gt;
                       &lt;/tr&gt;
                       &lt;tr&gt;
                          &lt;td align="center" width="100%"&gt;
                             &lt;table bgcolor="#e6e6e6" style="border: 1px solid #b8b8b8;" width="100%" cellpadding="0" cellspacing="5"&gt;
                                &lt;tr&gt;
                                   &lt;td width="100%" align="center"&gt;
                                      7RG5poe9lgxmUSIcQTPji8EtFMnXyOYW3Cf
                                   &lt;/td&gt;
                                &lt;/tr&gt;
                             &lt;/table&gt;
                          &lt;/td&gt;
                       &lt;/tr&gt;
                       &lt;tr&gt;
                          &lt;td width="100%"&gt;
                             Please leave us feedback so that we can improve our software.
                          &lt;/td&gt;
                       &lt;/tr&gt;&lt;tr&gt;
                          &lt;td width="100%"&gt;
                             big Team
                          &lt;/td&gt;
                       &lt;/tr&gt;
                    &lt;/table&gt;
                 &lt;/td&gt;
              &lt;/tr&gt;
           &lt;/table&gt;
        &lt;/td&gt;
     &lt;/tr&gt;
  &lt;/table&gt;

</body>

</html>
–48673093–

My headers function is…


function mail_header ($type, $random_hash)
{
	$type = (int)$type;
	
	if ($type === 0)
	{
		$boundary	 = $random_hash;
		$x_mailer	 = phpversion();
		$time_stamp	 = date("r");
		
		$headers  = 'Message-ID: <'.$boundary.'-050333@big.com>' . "\\r\
";
		$headers .= 'Date: ' . $time_stamp . "\\r\
";
		$headers .= 'MIME-Version: 1.0' . "\\r\
";
		$headers .= 'X-Mailer: PHP-' . $x_mailer . "\\r\
";
		$headers .= 'X-Sender: "big" <contact@big.com>' . "\\r\
";
		$headers .= 'X-Priority: 3' . "\\r\
";
		$headers .= 'Organization: big' . "\\r\
";
		$headers .= 'Errors-To: contact@big.com' . "\\r\
";
		$headers .= 'Sender: contact@big.com' . "\\r\
";
		$headers .= 'From: "big" <contact@big.com>' . "\\r\
";
		$headers .= 'Reply-To: "big" <contact@big.com>' . "\\r\
"; 
		$headers .= 'Return-Path: "big" <contact@big.com>' . "\\r\
"; 
		$headers .= 'Content-Type: multipart/alternative; boundary=' . $boundary . "\\r\
";
	}
	
	return $headers;
}

Gmail is pretty good at picking up on spammy emails, and things like “why not participate in our Beta …” looks a bit sus to me, so perhaps stuff like that is what Google doesn’t like. You can use things like SPF records to help validate the source of your emails, though I don’t know much about this stuff.

Thanks for the suggestions, but my content is not the reason why it’s getting nagged as spam. I think my DKIM is off.

Blind shot in the dark: try using
instead of \r
.

Heh… I’ve already tried that. Email is soooo hard! Errr…