title: why printing html code in email receive send by PHP?
body: <p>i am writing a code for <code>Php</code> mailer crone job. 
  email is going and receiving but why i am receiving <code>HTML</code> code in email. instead of <code>HTML</code> template.</p>
  
  <p>i also used proper email header and also test on other users email accounts. but same problem printing <code>HTML</code> code in email. </p>
  
  <p>i also use <strong><code>&lt;html&gt;&lt;body&gt;&lt;h2&gt;Hello&lt;/h2&gt;&lt;/body&gt;&lt;/html&gt;</code></strong> in message instead of template code. but same problem printing <code>&lt;html&gt;&lt;body&gt;&lt;h2&gt;Hello&lt;/h2&gt;&lt;/body&gt;&lt;/html&gt;</code> in email receive.</p>
  
  <p><strong>Php code</strong></p>
  
  <pre><code> //database connection
          require_once("include/config.inc.php");
          require_once("include/functions.inc.php");
  
          //init function 
          mailerCrone();
  
          //defined functions
          function mailerCrone() {
  
              $site_admin  = 'myemail@gmail.com';
              $headers = "MIME-Version: 1.0" . "\r\n";
              $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
              $headers = "From: " . $site_admin . "\r\n";
              $headers .= "Reply-To: ". $site_admin . "\r\n";
  
              $currentdate =  date('Y-m-d H:i:s');
  
              //get data to send mails 
              $getDataTomail = mysql_query("SELECT * FROM sendmails where status = 0 ORDER BY id ASC limit 0,10");
  
              while($resDataTomail = mysql_fetch_array($getDataTomail)) {
  
                  $templateId = $resDataTomail['templ_id'];   
                  $dataPreparedId = $resDataTomail['id'];     
  
                  //get the template data
                  $getTemplate = mysql_query("SELECT * FROM templates where id  = $templateId");
                  $resTemplate = mysql_fetch_array($getTemplate);
                  echo $msg = '&lt;html&gt;&lt;body&gt;'.$resTemplate['templ_content'].'&lt;/body&gt;&lt;/html&gt;';
                  //mail($to, $subject, $message, $headers);
                  $mailResponce = mail($resDataTomail['subs_email'], $resTemplate['templ_name'], $msg, $headers);
  
                  if($mailResponce == '1') { 
                      //update status of selected data after send mail
                      $updateSendMailData = mysql_query("UPDATE sendmails SET status = '1' WHERE id = $dataPreparedId") or die(mysql_error());
  
                  }
              }
          }
  </code></pre>