MailPress is the most powerful free self-hosted automatic newsletter plugin for WordPress, according to my detailed comparison of WordPress newsletter plugins. But and all that power can make it a little tricky to configure.
Having a newsletter on your blog allows visitors to subscribe to regular updates via email. An automatic newsletter simplifies the process so that all you have to do is post articles to your blog, and the newsletter to your subscribers is built and sent automatically with no extra effort from you. Even with the advent of RSS feeds and Twitter, email is still the easiest way of getting back in touch with people who have visited your blog before, and giving them a reason to visit again.
So here is a step-by-step guide to configuring your MailPress newsletter:
Install MailPress
If you don’t already have MailPress installed, now is the time. Add it just like any other plugin from the Plugin Directory, and enable it.
Enable The Add-Ins
Go to Plugins → MailPress Add-Ons and activate these add-ons, if they aren’t active already:
- Batch_send
- Bounce_handling
- Filter_img
- Newsletter
- View_logs
- Tracking_ga or Tracking, depending on whether you want to use Google Analytics or MailPress’s built-in click tracking to track click-thru rates in your newsletter.
If you have a complex site and want to create a separate newsletter for each category, also enable:
- Newsletter_categories
Configure Basic MailPress Settings
Go to Settings → MailPress → General. Under Admin, make sure Dashboard Widgets is selected, and under From check the address that mails will be sent from is correct. If you don’t already have a mailbox you read regularly at this address, set it up now.
Go to the Test tab, and check that MailPress can send a basic test email.
Go to the Subscriptions tab, and select whether you want to enable newsletters that send for every post you publish (Per post), Daily, Weekly or Monthly. If you post a lot of articles, I recommend Daily or Weekly. You can enable them all, but the more choices you give your visitors the more likely they will get confused. Don’t go overboard here; I recommend you just pick one option.
Make sure the Default box is selected underneath your choice of newsletter: this indicates which newsletter the MailPress subscription widget and shortcode will add subscribers to.
If you have separate newsletters for each category, you need to enable them here. Remember that you have to come back and do this each time you add a new WordPress category; which is one of the downsides of having per-category newsletters.
You’ll want to watch your logs for a while to ensure that everything is working: On the Logs tab, for both Newsletter and Batch select Logging Level: E_ALL, Number of Bounces log files: 7, which will keep the logs for one week.
Choose Your MailPress Theme
Under Mails → Themes, choose your MailPress theme. I use a slightly modified version of MailPress Twenty Ten, which matches the WordPress default Twenty Ten theme nicely.
All email sent by MailPress, including your newsletters, will be styled with this theme. This gives a consistent look and feel, or branding if you like, to your visitor’s email interactions with the site.
Disable Normal wp-cron
If you haven’t already done so, I recommend that you disable wp-cron from running in the background. Unless you do this, a bug in WordPress’s wp-cron can cause your subscribers to receive duplicate newsletters.
Note that if you follow my instructions exactly, you’ll end up creating 3 cron tasks for your blog:
- To run wp-cron regularly
- To schedule your MailPress Newsletter batch processing
- To schedule automatic MailPress bounce email processing
Configure Batch Processing
Low cost web hosting services often have rather draconian email policies; they may bounce your email if you send it too quickly (like HostGator do), or they may simply drop it without notifying you (like IX Web Hosting do). They don’t really care much about getting email from your site delivered correctly; but there are ways around this.
MailPress sends a separate email to each newsletter subscriber, which allows personalisation and bounce handling to work. Even if your web host allows large numbers of emails to be sent in quick succession, the time taken to send all these emails may exceed your web host’s PHP max_execution_time. MailPress attempts to increase this limit, but HostGator sets a rather small hard limit of 30 seconds.
The result of all this is that you almost certainly want to configure batch processing, even if you think at first you don’t need to. To do this, go to Settings → MailPress → Batches. The settings I use on HostGator to keep me under the 30 second max_execution_time are:
- Max mails sent per batch to 20
- Max retries to 3
- Submit batch with to Other.
I don’t recommend you use WP_Cron, because caching plugins like W3-Total-Cache interfere with it. Even if you disable wp-cron from running in the background, I still recommend you set up a cron task to send each batch of emails so you can vary exactly how often batch processing runs independent of other wp-cron tasks.
Set Up A Cron Task To Send Each Batch
Leave the WordPress admin backend for a moment, and visit your web host’s CPanel in a new web browser window. On the Advanced menu, choose Cron jobs.
Check that the Cron Email address is set to an address that you read regularly.
Under Add New Cron Job, choose Common Settings: Once an hour. Change the Minute field to a random odd or prime number like 27, so your job doesn’t have to compete on the hour with everyone else’s.
The Command: must be all on one long line. Use the sample path MailPress gave you when you selected Submit batch with: Other:
path-to-php -f sample-path/cron.php >/dev/null
On HostGator for example mine looks like:
/usr/bin/php -f /home/username/public_html/wp-content/plugins/mailpress/mp-content/xtras/mp_batch_send/cron.php >/dev/null
The purpose of the >/dev/null is to discard the output of the cron job so you don’t routinely receive pointless emails. I recommend you test this initially by omitting the >/dev/null, and checking that you get an email when the job runs. Temporarily change the job to run more often while you’re testing. If all is working, you should receive an email containing a ’1′. Add the >/dev/null later once you’ve checked everything is working so you don’t end up flooded with useless email.
Note that when you enable automatic bounce handling, you’ll create another cron command with slightly different parameters. You need them both.
Enable Automatic Bounce Handling
People come and go, and they don’t always unsubscribe from your newsletter when their email address drops off the planet. This is bad because it generates bounce messages that can flood your inbox and/or increase the load on your email server without you even being aware of it. Your web host will hate you for this, especially since they didn’t care that much about your email in the first place. You’ll also think you have more subscribers than you actually do.
The solution is to configure automatic bounce message processing in MailPress.
Add a Subscription Widget
If you want a subscription widget to appear in your sidebar, go to Appearance → Widgets. Grab the MailPress widget and drag it across into one of the widget areas provided by your WordPress theme.
Set a title like Subscribe via Email, and a button text of Subscribe. Enable Manage your subscription link so savvy visitors can change their subscriptions. Leave the Preloaded checkboxes unselected, unless you’ve hacked your theme and know what you’re doing.
You’ll also want to style the subscription widget so it looks more appealing.
Create a Subscription Page
If you’d like to have a page to handle newsletter subscriptions, create a static page using Pages → Add New. Title it Newsletter Subscriptions, or something similar. I recommend giving it a simple permalink that you’ll remember, like /newsletter.
On the page, include the MailPress shortcode:
[mailpress]
Visitors that enter their name and email address will be added to the default newsletter that you configured earlier. Add the newsletter signup page to your menu so visitors can find it, using Appearance → Menus → Pages.
Disable Filters That Generate Bad Email Content
Some WordPress plugins modify the content of your posts in ways that work well on the web, but not so well in email. If you have any such plugins, you need to modify your MailPress theme to disable plugins which generate bad email content. If you want to embed videos in your content, you’ll need to workaround poor embedded video support too.
Test It
Subscribe an email address you own that isn’t associated with the site to the newsletter, via the widget or the subscription page. Post an article on your blog. Note that since you’re using hourly batch processing, it may take up to an hour for the article to show up in your inbox.
Check The Logs
After posting an article and waiting for the batch processing cron job to run, you can check the logs in MailPress under Mails → Logs and looking for Name: MP_Log_x_MP_Newsletter_sched_proc_yyyymmdd.txt and MP_Log_x_MP_Batch_mp_process_batch_send_yyyymmdd.txt
W3-Total-Cache Users Note
There is a problem running cron jobs using W3-total-cache, which you can fix in MailPress 5.0.1 by adding this line to cron.php:
<?php define('DOING_CRON', true);
...This is already fixed for you in MailPress 5.1.
Related posts:

Processing...



Pingback: Mail Press Configurations | Shirey Enterprise Group
Just - Thanks you. This is the most cumbersome plugin I have seen. Your guide made all the difference!
Thanks.
Twitter: BuildYourBlogN
says:
Glad I could help!
Hi Graham - I used your guide to set all this up last September with an earlier version of both WP and MP. Just today I have updated both of them to their current versions. Are your instructions for setting up a newsletter still the same with WP 3.3.1 and MP 5.2.1? Is there anything I should be aware of (tweaks, reconfigs, etc.) to ensure this will still work on my next send? I noticed after updating WP that I was getting some pretty funky cron job notifications:
"failed to open stream: Permission denied in . . . "
"supplied argument is not a valid stream resource in . . . "
"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1025 bytes) in . . . "
I assumed I needed to update MP along with it so I did. Anything to worry about with this? Thanks!
Twitter: BuildYourBlogN
says:
I've recently done the same update myself, and had no problems; the instructions should be the same. The Fatal error looks like you're exceeding your PHP max_memory_size which often defaults to 64Mb. Check to see if you have any plugins which are using a lot of memory, and try your hosting service's tech support. Cheers, Graham
Well, the cron messages are clearly referencing MP:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1025 bytes) in /home/*********/public_html/wp-content/plugins/mailpress/mp-includes/class/MP_Pop3.class.php on line 17
Warning: fopen(/home/*******/public_html/wp-content/plugins/mailpress/tmp/MP_Log_0_mp_sched_proc_newsletter_20120122.txt) [function.fopen]: failed to open stream: Permission denied in /home/*******/public_html/wp-content/plugins/mailpress/mp-includes/class/MP_Log.class.php on line 152
Warning: fputs(): supplied argument is not a valid stream resource in /home/*******/public_html/wp-content/plugins/mailpress/mp-includes/class/MP_Log.class.php on line 153
Warning: fclose(): supplied argument is not a valid stream resource in /home/******/public_html/wp-content/plugins/mailpress/mp-includes/class/MP_Log.class.php on line 154
Any idea what this is about?
Twitter: BuildYourBlogN
says:
Yes, it's MailPress breaking the camel's back all right, but it may not be the main culprit. Or it might; I haven't seen MailPress hog memory in the past. Perhaps if you're using large batch sizes it could be a problem. If your hosting service allows you to alter the PHP max_memory_size, that will get around the problem - try upping it to 128Mb. Otherwise you'll have to work out what plugin is using so much memory in PHP.
Got it and mind you it really worked out. thanks to you;p
Twitter: unmondeaventure
says:
Hi Graham,
Thank you for this great post.
All is working for me.
But, I have a lot of posts on my website and the monthly newsletter is very big (>4Mo).
How to include only a preview or a summary of each post in the newsletter ?
Thank you in advance for your help.
François
Twitter: BuildYourBlogN
says:
From Andre's answer to this question:
Edit _loop.php in your MailPress theme and replace:
< ?php $this->the_content( __( '(more...)' ) ); ?>with
< ?php the_excerpt(); ?>Twitter: prayerchristian
says:
Thanks for this great tutorial. It's helping me get Mailpress set up and understands features. I made the changes to the cron jobs.
I can't send a single email though. I don't suppose you'd have any guesses? I'm using hostgator. None of the tests send.
Twitter: BuildYourBlogN
says:
Check that you've got the connection_php Add-on enabled. Go to MailPress Settings, Test and check that test message sending works. If you get an error message, track that down. Also check your spam folder. If nothing else works, contact HostGator technical support.
Twitter: citiesatdawn
says:
Hi Graham
Exactly were is this done on the newly created newsletter page?
TIA
Anthony
"On the page, include the MailPress shortcode:
[mailpress]"
Twitter: BuildYourBlogN
says:
You just put the text mailpress surrounded by square brackets where you want the signup form to appear in the WordPress page editor. This is called a shortcode. Click Preview, and you'll see the form in its place. Cheers, Graham.
Twitter: citiesatdawn
says:
Thanks Graham
I'm finding the learning curve a bit steep with Mailpress. Now my SMTP button has disappeared!
Twitter: chemieemma
says:
Thank you so much for this tutorial. Now I have a working blogpost subscription! *doesundignifiedhappydance*
Twitter: BuildYourBlogN
says:
You're welcome! Love the dance.
I've figured out the addition to the test group mailing list, or at least a workaround. Wish it was included in the edit mailing list option. I'm trying to figure out the opt out option for the emails if someone gets an email and they want to stop the subscription. Where can I find that?
Thanks,
C-
Chris Colley recently posted..Welcome to the new NVBCL.org
Twitter: BuildYourBlogN
says:
Hey Chris. There's a line at the bottom of footer.php in your MailPress theme which says "Manage your subscriptions". I change this to read "Click here to unsubscribe or change your subscription options", so it's clearer for people who get an email and want to unsubscribe.
I've set everything up for the Mailpress plugin but I'm having problems with mailing lists. I want to set up a small 2-3 person test mailing list but I don't see anywhere to add the emails when I create the mailing list. I've looked on the mailpress forum but I don't see anything regarding this. I'm likely missing something obvious but can't find anything.
Thanks for any help you can give.
C-
Twitter: BuildYourBlogN
says:
Sure; see this post for how to add users manually.
Should I be getting a "permission denied" message in my email notification? Here is the content:
/bin/sh: /home/******/public_html/wp-content/plugins/mailpress/mp-content/xtras/mp_batch_send/cron.php: Permission denied
Also, although I copied and pasted the sample path MailPress gave me, I'm noticing mine looks a bit different than yours. Yours starts with /usr/bin/php -f, whereas mine starts with /bin/sh:
I am using HostGator, so I assumed they would look similar. Thanks.
Twitter: BuildYourBlogN
says:
You need to invoke the .php script with the PHP interpreter; that's the reason for the /usr/bin/php -f instead of /bin/sh.
Thanks for providing this step-by-step--very thorough and helpful! My question has to do with the auto-responder confirmation emails that are sent after someone subscribes. I'm using the 2010 theme, and they look fine, but I'd like to modify the text as well as the titles (at this pint it's reflecting my blog name rather than my newsletter name). I'd also like to remove the MailPress footer that appears at the bottom. Any suggestions? Again, thanks!
Twitter: BuildYourBlogN
says:
Play around with your MailPress theme in wp-content/plugins/mailpress/mp-content/themes/your-theme/, particularly header.php and footer.php