title: Php mail: how to send html?
body: <p>The code below is sending an email correctly but for the body. I need to show html in the body of the message and I cannot make it. The examples in the web won't send the email :(</p>
  
  <p>How can I fix my code to send the email with the html in the body? </p>
  
  <p>Thanks a ton!</p>
  
  <pre><code>&lt;?php
  
  $to = 'mymail@mail.com';
  
  $subject = 'I need to show html'; 
  
  $from ='example@example.com'; 
  
  $body = '&lt;p style=color:red;&gt;This text should be red&lt;/p&gt;';
  
  ini_set("sendmail_from", $from);
  
  $headers = "From: " . $from . "\r\nReply-To: " . $from . "";
    $headers .= "Content-type: text/html\r\n"; 
  if (mail($to, $subject, $body, $headers)) {
  
    echo("&lt;p&gt;Sent&lt;/p&gt;");
   } else {
    echo("&lt;p&gt;Error...&lt;/p&gt;");
   }
  
  ?&gt;
  </code></pre>