Note that there are some explanatory texts on larger screens.

plurals
  1. POHtml email ignores all the inline css
    primarykey
    data
    text
    <p>I am posting the content from html to php via ajax call. I want to send a html email with that posted content. I echoed the posted data it has all the inline css. But in the mail I can see only the html content with no css effect.</p> <p>my html code will have some static content with content editable features.</p> <pre><code> &lt;form id="form"name="form" method="post" action="xyz.php" onsubmit="this.divcontent.value = document.getElementById('email_body').innerHTML;"&gt; &lt;input type="hidden" name="divcontent" id="divcontent" value="" /&gt; &lt;div id="email_body" class="field" role="textbox" contenteditable="true"&gt; &lt;div style="...."&gt;......&lt;/div&gt; &lt;a&gt;.....&lt;/a&gt; &lt;div style="...."&gt;....&lt;/div&gt; &lt;div style="...."&gt;....&lt;/div&gt; &lt;/div&gt; &lt;div class="send_mail"&gt;&lt;button type="submit"&gt;Send&lt;/button&gt;&lt;/div&gt; &lt;/form&gt; </code></pre> <p>my ajax call </p> <pre><code> $.ajax({ type : 'POST', url : $("#form").attr('action'), data : fields, dataType : 'json', success: function() {......}....}); </code></pre> <p>my php code is sending the mail with no css effect.</p> <pre><code> &lt;? $email_body = $_POST[divcontent]; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; //create email headers $headers .= 'From: '.$email_from."\r\n". 'Reply-To: '.$emailid_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_body, $headers); $array = array('error' =&gt; false, 'message' =&gt; $message); echo json_encode($array); echo json_encode($array); ?&gt; any suggestions? </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload