title: PHP script to send html email
body: <p>I have written this PHP script to send a HTML email. However the email output is appearing as raw text and not being interpreted as html.</p>
  
  <pre><code>&lt;?php 
   if(isset($_POST['submit']))  {
      $to = $_POST['email'];
      $from = "info@test.com";
      $subject = "subject";
      $message = "&lt;div style=\"background:red;height:100px; " .
        "width:100px;display:block;\"&gt;dfsdf&lt;/div&gt;";
  
      $headers = "MIME-Version: 1.0rn";
      $headers .= "Content-type: text/html; charset=iso-8859-1rn";
      $headers  .= "From: $from\r\n";
      mail($to, $subject, $message, $headers);
      echo "Message has been sent....!";  
   }else{
      echo "Add an email address"; 
   }
  ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="/send" method="post"&gt;
    &lt;input name="email" type="text" /&gt;
    &lt;input name="submit" type="submit" value="Submit"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The email I get is:</p>
  
  <pre><code>&lt;div style="background:red;height:100px;width:100px;display:block;"&gt;dfsdf&lt;/div&gt;
  </code></pre>
  
  <p>I expect to be getting a red box.  What am I doing wrong?</p>