How To Stop The System Emails Undermining Your WordPress Site
How To Stop The System Emails Undermining Your WordPress Site
The system emails sent out by your WordPress site are drab, unfriendly and branded WordPress. In short, they are unprofessional.
In this Weekend Project, we’ll look at some helpful, easy-to-use plugins that will make sure that those system emails, especially the Welcome email, maintain rather than undermine the good work your site does.
We’ll find out not only how to brand those emails as your own but also how to make them friendly, more informative and much more visually appealing and consistent with your site’s theme.
Changing the From Name and Address
Out-of-the-box WordPress sends all emails with a From Name of WordPress and a From Email Address of [email protected][site domain name] making this the perfect place to start for customization.
Rather than diving into code to change these settings, here’s a plugin written by WPMU Dev’s Aristeides Stathopoulos that will allow you do this from a Settings page in the admin interface.
Upload and activate the plugin. Once activated, go to Settings > Mail Change.
Simply enter your preferred email address in the From Address and your preferred name in the From Name and click Save Changes. The settings will be saved and now all emails will be sent from the new name and email address.
Adding a Signature Block To Emails
We are all familiar with signature blocks, those snippets of text – usually contact details, often ‘Sent from my iPhone’ and occasionally marketing messages , that get tagged onto the bottom of every email.
David Anderson has come up with a plugin to set and add signatures to your email. After installing and activating the Add Email Signature plugin from the WordPress repository, you’ll find a simple form under Settings > Add Email Signature allowing the editing of a signature.
It’s important to note that the signature only gets add to text emails (default). If you are sending HTML emails then the signature will not be displayed.
Adding Visual Flair To Your Emails
Taking customization a step further, several plugins allow you to specify a template for your emails. Not only can this make your emails more visually appealing but also enables you keep some visual consistency between your site and emails that your users receive from you.
Install and activate the WP Better Emails plugin from the WordPress plugin repository and head to Settings > WP Better Emails.
First thing to notice is that this plugin provides its own overrides of the default From Name and From Email Address, so if you decide to use this plugin then you can disable and delete the Mail Change plugin we covered at the top of the article.
1.6 million WordPress Superheroes read and trust our blog. Join them and get daily posts delivered to your inbox - free!
This plugin allows you to create both an HTML and plain text template template to cater for all mail clients. The WYSIWYG editor is the same as that found in the editing screens, so you should feel at home.
All you really need to take care with is that you include %content% in both templates, otherwise your emails will effectively be empty! As well as the %content% tag, the plugin also caters for:
- %blog_url% – WordPress Address (from Settings > General)
- %home_url% – Site Address (from Settings > General)
- %blog_name% – Site Title (from Settings > General)
- %blog_description% – Tagline (from Settings > General)
- %admin_email% – E-mail Address (from Settings > General)
- %date% – Current date in format specified in Settings > General
- %time% – Current time in format specified in Settings > General
To access this list at any time, click on the Help tab in the top right corner of the page.
It’s also possible to add your own tags using a filter provided by the plugin. See the plugin page for more details.
I think that the benefit this plugin provides is well worth the effort in setting it up. After all, the first email a reader will get from your site is when they register, so you want to make a good impression. There are no second chances with a first impression, as they say.
Customizing the Email Content
So, we’ve looked at changing the From Name and Email Address and putting a template around the email content. But what about the content itself?
Like me, you might think that this is fairly fundamental to running a site and that it should be available in the admin interface. The bad news is that the new registration (‘welcome’) email, for example, is about as far removed from admin interface as is possible, being deeply embedded in the pluggable.php file in the wp-includes folder. Definitely somewhere we don’t want to go editing.
One other annoying aspect is that whilst the comment, trackback and pingback notifications all have filters applied to their subject and content, allowing them to be easily changed, the new user registration does not. Why there isn’t consistency across the emails only the WordPress gods know.
The good news is that Sean Barton has done the heavy lifting for us and created his SB Welcome Email Editor which enables the editing of the content for the following emails:
- Welcome email to new user
- New user notification to Admin
- Forgot password (sent to user)
Install and activate the plugin and click on Settings > SB Welcome Email. There are a number of options to complete here and again you can set the From Email Address and From Name. You can also set whether to send the emails in text or HTML format and, of course, set the subject and body for the emails listed above.
As you can see from the above screenshot, this plugin plays really nicely with the WP Better Email plugin so if you want to use both I would recommend the following settings for SB Welcome Email:
- From Email Address – leave blank (use settings from WP Better Email)
- From Name – leave blank (use settings from WP Better Email)
- Send Email As – TEXT
- Set Global Email Headers – No
Keeping the emails as text means that WP Better Emails has no problems wrapping the content in its template and will also send out both an HTML and plain text version.
If This Has Whet Your Appetite
Customizing emails is just one of many areas of potential customization. If you are interested in extending customization into the admin interface, including login screens, then check out WPMU Dev’s Ultimate Branding plugin and see just how far you can customize WordPress.