How to change WordPress email content type to HTML instead of text?

Posted by Prem Tiwari | Updated on

WordPress uses wp_mail() function to send all emails and the default content type for these emails is text/plain. It simply means that all emails, goes through WordPress, will be sent in text format only. Here I have shared how to change the default email content type from text to HTML.

How to change WordPress email content type to HTML instead of text

Open you theme’s functions.php file and add the below code or you can also add the below code if you are using any site-specific plugin.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers