title: Why my website emails go to SPAM box?
body: <p>All emails that my site is sending are going to SPAM box in Gmail (I haven't tested other email servers).</p>
  
  <p>I'm sending emails through Gmail using my own domain (via Google Apps). I send the emails using the <a href="http://code.google.com/a/apache-extras.org/p/phpmailer/" rel="nofollow">PHPMailer</a> library:</p>
  
  <pre><code>$mail = new PHPMailer();
  $mail-&gt;IsSMTP();
  $mail-&gt;SMTPAuth = true;
  $mail-&gt;SMTPSecure = "ssl";
  $mail-&gt;Host = "smtp.gmail.com";
  $mail-&gt;Port = 465;
  $mail-&gt;Username = "myuser@example.com";
  $mail-&gt;Password = "mypassword";
  $mail-&gt;From = "noreply@example.com";
  $mail-&gt;FromName = $websiteName;
  $mail-&gt;Subject = $subject;
  $mail-&gt;AddAddress($to, "Client");
  if ($html) {
      $mail-&gt;MsgHTML($content);
      $mail-&gt;AltBody = strip_tags($content);
      $mail-&gt;IsHTML(true);
  } else {
      $mail-&gt;Body = $content;
  }
  if (isset($options['content-type'])) {
      $mail-&gt;ContentType = $options['content-type'];
  }
  if (isset($options['charset'])) {
      $mail-&gt;CharSet = $options['charset'];
  }
  
  return $mail-&gt;Send();
  </code></pre>
  
  <p>The email is sent as expected, but always falls into SPAM box. It happens in emails that contain HTML and in emails that are raw text like this:</p>
  
  <blockquote>
    <p>Hello John Smith,</p>
    
    <p>Thank you very much for trusting us.</p>
    
    <p>To finish your purchase you should deposit XX USD to the account
    number:</p>
    
    <p>IBAN XXXX - XXXX XXXX XX XX XXXXXX</p>
    
    <p>Once we receive your transfer, we will activate your license and send
    all documents by e-mail (a copy of the contract, invoice, user guide
    concerning the application). You have 15 days to review all the
    material and the application itself and if you are not fully satisfied
    with the product you purchased, we will refund your money.</p>
    
    <p>If you need some agent's help you can reply this email.</p>
    
    <p>Greetings</p>
  </blockquote>
  
  <p>Well this message may be contains some words that could activate the SPAM filter, but it also happens with messages like this:</p>
  
  <blockquote>
    <p>Hello</p>
    
    <p>You have a new message in your inbox:</p>
  
  <pre><code>Meeting about next holidays (17:40-18:20).
  </code></pre>
    
    <p>We hope to see you soon!</p>
    
    <p><a href="http://example.com/" rel="nofollow">http://example.com/</a></p>
  </blockquote>
  
  <p>What's wrong? What's the best strategy to send emails through gmail without being penalized?</p>