title: PHPMailer - mails going straight to spam
body: <p>Whenever I send an automated e-mail using PHPMailer, it goes straight into the spam folder in Gmail. I have tried finding a solution to this myself but I don't know enough about e-mails and e-mail headers.</p>
  
  <p>Can anyone explain why this is happening?</p>
  
  <p>PHP Code is below, followed by the headers that show up from the receiver.</p>
  
  <p>Thanks!</p>
  
  <pre><code>$mail = new PHPMailer;
  $mail-&gt;From = "chrisxenongroup@server.xenonacademy.org.uk";
  $mail-&gt;FromName = 'Xenon Group Academy';
  $mail-&gt;AddAddress($email);
  $mail-&gt;Subject = "Your Xenon Group Academy login details";
  $mail-&gt;IsHTML(true);
  $mail-&gt;Body = "&lt;html&gt;&lt;body&gt;&lt;h3&gt;Welcome to the Xenon Group Academy&lt;/h3&gt;&lt;p&gt;The Academy is an online system that will allow you to access course materials, manage your assignments and network with other Xenon Group students.&lt;/p&gt;
  &lt;p&gt;To access your account, go to &lt;a href='http://www.xenonacademy.org.uk'&gt;www.xenonacademy.org.uk&lt;/a&gt; and use the following details to login.&lt;/p&gt;&lt;p&gt;&lt;pre&gt;E-mail:            $email&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;Password:       " . mysqli_real_escape_string($conn, $_POST['password']) . "&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once you have logged in, we would recommend changing your password to something secure and easy to remember. You can also change your login e-mail address if you need to.&lt;/p&gt;&lt;p&gt;Welcome to the Academy, and good luck with your qualification!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;";
  $mail-&gt;Send();
  
  
  
  Delivered-To: xxxxxxxxxx@gmail.com
  Received: by 10.49.109.71 with SMTP id hq7csp68808qeb;
          Thu, 23 May 2013 07:27:28 -0700 (PDT)
  X-Received: by 10.180.37.243 with SMTP id b19mr25275110wik.12.1369319247650;
          Thu, 23 May 2013 07:27:27 -0700 (PDT)
  Return-Path: &lt;chrisxenongroup@server.xenonacademy.org.uk&gt;
  Received: from server.xenonacademy.org.uk (vps69719724.123-vps.co.uk. [46.32.233.107])
          by mx.google.com with ESMTPS id n5si14506537wic.103.2013.05.23.07.27.26
          for &lt;xxxxxxxxxx@gmail.com&gt;
          (version=TLSv1 cipher=RC4-SHA bits=128/128);
          Thu, 23 May 2013 07:27:27 -0700 (PDT)
  Received-SPF: neutral (google.com: 46.32.233.107 is neither permitted nor denied by best guess record for domain of chrisxenongroup@server.xenonacademy.org.uk) client-ip=46.32.233.107;
  Authentication-Results: mx.google.com;
         spf=neutral (google.com: 46.32.233.107 is neither permitted nor denied by best guess record for domain of chrisxenongroup@server.xenonacademy.org.uk) smtp.mail=chrisxenongroup@server.xenonacademy.org.uk
  Received: by server.xenonacademy.org.uk (Postfix, from userid 10000)
      id DFBAAE0288; Thu, 23 May 2013 15:27:24 +0100 (BST)
  To: xxxxxxxxxx@gmail.com
  Subject: Your Xenon Group Academy login details
  X-PHP-Originating-Script: 10000:class.phpmailer.php
  Date: Thu, 23 May 2013 15:27:24 +0100
  From: Xenon Group Academy &lt;chrisxenongroup@server.xenonacademy.org.uk&gt;
  Message-ID: &lt;10c74f9a6380f353cb1bdfb4e7c22f52@www.xenonacademy.org.uk&gt;
  X-Priority: 3
  X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/)
  MIME-Version: 1.0
  Content-Transfer-Encoding: 8bit
  Content-Type: text/html; charset=iso-8859-1
  
  &lt;html&gt;&lt;body&gt;&lt;h3&gt;Welcome to the Xenon Group Academy&lt;/h3&gt;&lt;p&gt;The Academy is an online system that will allow you to access course materials, manage your assignments and network with other Xenon Group students.&lt;/p&gt;
  &lt;p&gt;To access your account, go to &lt;a href='http://www.xenonacademy.org.uk'&gt;www.xenonacademy.org.uk&lt;/a&gt; and use the following details to login.&lt;/p&gt;&lt;p&gt;&lt;pre&gt;E-mail:            xxxxxxxxxx@gmail.com&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;Password:     xxxxxxxx&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once you have logged in, we would recommend changing your password to something secure and easy to remember. You can also change your login e-mail address if you need to.&lt;/p&gt;&lt;p&gt;Welcome to the Academy, and good luck with your qualification!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Thanks!</p>