Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on TumblrEmail this to someone

Default email content type for WordPress email are in text/plain. To change the content type of WordPress email you can use the filter :  wp_mail_content_type.

<code class=" language-php"><span class="token function">add_filter<span class="token punctuation">(</span></span> <span class="token string">'wp_mail_content_type'</span><span class="token punctuation">,</span> <span class="token string">'change_to_html_content_type'</span> <span class="token punctuation">)</span><span class="token punctuation">;
</span></code>
<code class=" language-php"><span class="token comment" spellcheck="true">/**
 * Change to HTML content type
 */
</span>
<span class="token keyword">function </span></code>change_to_html_content_type<span class="token function"><span class="token punctuation">(</span></span><span class="token punctuation">)</span> 
<span class="token punctuation">{</span> 
<span class="token keyword">  return</span> <span class="token string">'text/html'</span><span class="token punctuation">;</span> 
<span class="token punctuation">}</span>