Category Covered

Sending mail in wordpress but mail show all html code

If you see your html code on your mail whenever you are sending from wordpress then you have make sure that you over writen it before your wp_mail function.

The default content type is 'text/plain' which does not allow using HTML. However, you can set the content type of the email by using the 'wp_mail_content_type' filter.

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