Snippet: Set E-mail content type to text/html

Add following snippet to “functions.php”


add_filter( 'wp_mail_content_type','mail_set_content_type' );
function mail_set_content_type(){
    return "text/html";


All emails sent out using WordPress wp_email function will be treated as an HTML e-mails by default. So you can use HTML tags like



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>