HTML Email notifications

Hello!

So I’ve spent the past new days working on our notifications, and struggled when it came to formatting, as by default the emails were all sent as plain text rather than HTML. This meant I couldn’t add links/linebreaks.

I found a solution that forces WP mail to be sent as HTML;
add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));

The problem I heard with this is there might be a case in the future where the email sent is supposed to be in plain text.

The other solution was to change the S2 core files and make it use HTML there, I’ve never been one that wants to edit core plugin files as on updates, it’ll be overwritten.

This leaves me a bit confused on if there’s a better solution for this? Is there a reason they aren’t being sent as HTML emails?

I’d love to be able to solve this properly so any help would be appreciated.

Thanks, Harry.

The best solution is to use the WP Better Emails plugin: