Sending Multipart Email With WordPress
This article is part of a three part series exploring how to configure the WordPress content management system to send multipart emails. In part 1, I look at what we mean when we say multipart email and how it relates to WordPress.
By default, the WordPress CMS (content management system) builds the emails it sends in text format. However with a bit of tinkering, the system can be configured to send out HTML email and even the superior multipart format email allowing you to provide the best of both worlds to your users.
In the following articles in this series, I explore a technique for sending out multipart emails using WordPress. To get started, let’s take a look at what multipart emails are and why we should use them.
Multipart Email Explained
Multipart email refers to an email that has been constructed with two “message bodies”. In short, this means that by sending a multipart email you’re essentially providing two versions of your email message for the receiving email client to choose from.
One version of a multipart email’s message body is text based. Text based emails are great for email clients & devices that don’t support the HTML content type. Some recipients decide to disable HTML emails on their devices meaning that text based emails are all they can read. This can help them reduce the amount of data used when reading emails.
The second version of a multipart email is HTML based. HTML emails allow you to add a host of features to your email to make it more pleasing to the eye and interesting to read. Marketing emails use HTML email to great effect with interesting layout and design in order to promote goods and services.
Multipart Email and Spam Filters
Spam is an unfortunate by product of email. We all receive unsolicited emails we don’t want from services and companies we’ve never heard of. As such, spam filtering technology comes bundled in with our email clients in order to try and filter out the good from the bad, making sure the bad never even reaches our inbox.
Each email you receive will have a “spam score”. These are numerical ratings assigned based on rules used by services such as Spam Assassin to determine whether or not the email you have been sent is in fact spam or not.
Multipart emails have a beneficial effect on your email’s spam score. If you can get your website to send out emails in a multipart format, this can help to ensure your emails end up in users’ inboxes where they belong.
A lazy spammer wouldn’t take the time to create a plain text alternative, so HTML-only emails are a red flag for spam filters!
www.litmus.com
Email and WordPress
WordPress comes with the ability to send email by default. Whenever a new user or administrator is added for example, the system sends out email notifications. These notifications are text based and, as such can be quite bland.
Many contact form plugins, such as Contact Form 7, offer the ability to send HTML content instead of text based content when a user fills out the contact form on your site. However, they don’t offer the ability to send email in multipart format, meaning that we have to choose between plain text or HTML.
Please note: while this series explores a way in which we can configure WordPress to send multipart emails, the plugin it produces is meant for testing purposes only and not for use in a live environment.