LH Multipart Email gives every HTML email your WordPress site sends a plain text version alongside the HTML, so each message goes out as a proper multipart email.
WordPress, BuddyPress and most plugins send HTML-only email. A message with no plain text part is more likely to be marked as spam, and readers whose mail client shows text, or who use a screen reader or a watch, can end up with raw markup or nothing at all. This plugin fills the gap automatically, with nothing to configure.
Features
- Works on every HTML email sent through
wp_mail(), from core, BuddyPress or any plugin. - Builds the plain text with the html2text library, which keeps links, headings, lists and tables readable rather than just stripping the tags.
- Leaves alone any email that is already plain text or already has a plain text part.
- Handles several emails sent in one request, so one message’s plain text never carries over into the next.
- Never blocks an email: if a plain text version cannot be made, the HTML email is still sent.
Requirements
WordPress 5.5 or later and PHP 7.3 or later, with the PHP DOM extension. The html2text library is a Composer dependency, so after installing from GitHub run composer install --no-dev in the plugin folder. Until it is installed, emails are sent HTML-only.