PHP mail() showing up as spam
<p>This is an example of my register email, that sends an email to the user to activate their account.</p>

<pre><code>              //send activation email

                $to = $email;
                $subject = "Activate your account!";
                $headers = "From: Example.com\r\n";
                $headers .= "CC: $email\r\n";
                $headers .= "MIME-Version: 1.0\r\n";
                $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
                $server = "http://www.example.com";

              ini_set("SMTP",$server);
               $body= "&lt;table style='border-top:1px solid #707070;border-bottom:1px solid #707070;margin-top:5px;'&gt;";
              $body.="&lt;tr&gt;&lt;td colspan='2'&gt;&lt;span style='font-family:arial;font-size:12px;color:#000000;'&gt;Your login details are as follows; &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;";
              $body.= "&lt;tr style='background-color:#f2f4f6;margin-bottom:5px;'&gt;&lt;td&gt;Username:&lt;/td&gt;&lt;td&gt;$username&lt;/td&gt;&lt;/tr&gt;";
              $body.= "&lt;tr style='background-color:#f2f4f6;margin-bottom:5px;'&gt;&lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;$password&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
                $body.= "&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;span style='font-family:arial;font-size:12px;color:#000000;'&gt;Follow the link:&lt;/span&gt;&lt;/td&gt;";
              $body.="&lt;td&gt;&lt;a style='text-decoration:underline;font-family:arial;font-size:12px;color:#264971' href='http://www.example.com/activate.php?id=$lastid&amp;code=$random'&gt;http://www.example.com/activate.php?id=$lastid&amp;code=$random&lt;/a&gt;&lt;/td&gt;";
              $body.="&lt;/tr&gt;&lt;/table&gt;";         
                $body.="&lt;/body&gt;&lt;/html&gt;";

              //function to send email



              if(mail($to, $subject, $body, $headers)) {
</code></pre>

<p>When testing user registration the activation email ends up in the SPAM folder.  What do i have to change to correct this?  </p>
