Quantcast
Channel: smtp – WordPress.org Forums
Viewing all articles
Browse latest Browse all 2272

SendGrid INC on "[Plugin: SendGrid] Emails sent in plain Text in Place of HTML"

$
0
0

Hi, by default, the emails sent with Wordpres plugin are plain text.
In order to send html email you need to :
1. For setting html for a certain email - in Send Email form add in Headers the following line: content-type: text/html (see screenshot: http://screencast.com/t/H4tQ5sHX)
2. For setting html for all emails - you have to:
- Set the content type to 'text/html' running add_filter('wp_mail_content_type', 'set_html_content_type'); function before to wp_mail() one.
- After wp_mail() function you need to remove the filter: remove_filter('wp_mail_content_type', 'set_html_content_type'); in order to avoid conflicts


Viewing all articles
Browse latest Browse all 2272

Trending Articles