wp_mail wordpress html with style not aplying
<p>I'm trying to send mail from my wordpress plugin but when I retrieve it, it has not styles or images.</p>

<p>I'm doing this way:</p>

<pre><code>&lt;?php
$headers = array(
    "From: Enara &lt;no-reply@enara.es&gt;",
    "MIME-Version: 1.0",
    "Content-type: text/html; charset=UTF-8'"
);
$message = "&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv='Content-Type' content='text/html; charset=utf-8' /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div style='background-color: #16a085;'&gt;
            &lt;table&gt;
                &lt;tr&gt;&lt;td colspan='2'&gt;&lt;img style=\'margin-botton: 20px;\' src='http://enara.litrodeenergia.com/wp-content/uploads/2015/12/enara-white.png' /&gt;&lt;/td&gt;&lt;/tr&gt;
                &lt;tr&gt;&lt;td colspan='2'&gt;DATOS DE CLIENTE&lt;/td&gt;&lt;/tr&gt;
                &lt;tr&gt;&lt;td colspan='2'&gt;$particular&lt;/td&gt;&lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;Nombre:&lt;/td&gt;
                    &lt;td&gt;$nombre&lt;br&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;Apellidos:&lt;/td&gt;
                    &lt;td&gt;$apellidos&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;Nif:&lt;/td&gt;
                    &lt;td&gt;$nif&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;Tel&amp;eacute;fono:&lt;/td&gt;
                    &lt;td&gt;$telefono&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;";

$result = new stdClass();
$result-&gt;mailOk = wp_mail($to, $subject, $message, $headers);
</code></pre>

<p>I tried a style code in my head, delete the html/head/body blocks (only send the div html code), changed the content-type to <code>iso</code>, and made the wp filter <code>wp_mail_content_type</code> 'text/html'.</p>

<p>The image don't work also.</p>

<p>If I debug the recieved email  with devtools, I see:</p>

<pre><code>&lt;div style="background-color:#16a085"&gt;
&lt;table&gt;
&lt;tbody&gt;
    &lt;tr&gt;
        &lt;td colspan="2"&gt;&lt;img src="http://enara.litrodeenergia.com/wp-content/uploads/2015/12/enara-white.png" style=""&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan="2"&gt;DATOS DE CLIENTE&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan="2"&gt;Usuario particular&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Nombre:&lt;/td&gt;
        &lt;td&gt;afsd&lt;br&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Apellidos:&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Nif:&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Teléfono:&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p></p>

<p>And the email headers:</p>

<pre><code>Received: from server
Received: from 
Subject: Formulario Alta Usuario Web
X-PHP-Script: 
Date: Tue, 23 Feb 2016 11:07:52 +0000
From: 
Message-ID: &lt;53692f88fe04a71fd41ca2475611fa99@
X-Mailer: PHPMailer 5.2.14 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8'"
Content-Transfer-Encoding: 8bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - 
X-AntiAbuse: Original Domain - 
X-AntiAbuse: Originator/Caller UID/GID - [500 495] / [47 12]
X-AntiAbuse: Sender Address Domain - 
X-Get-Message-Sender-Via: 
X-Authenticated-Sender: 
X-Source: /usr/bin/php
X-Source-Args: /usr/bin/php /home/public_html/
X-Source-Dir: litrodeenergia.com:/public_html/
Return-Path: 
X-MS-Exchange-Organization-Antispam-Report: IPOnAllowList
X-MS-Exchange-Organization-SCL: -1
</code></pre>