The Delivery Engine Speed
The delivery engine is a core part of Newsletter that takes care to send your newsletters. This engine works well if two conditions are satisfied:
- your blog is able to send emails reliably
- your WordPress cron system is working correctly
Both these topics are covered below.
How many newsletters can I send (at the same time)?
You can create and send how many newsletters you want. Each newsletter is put in “sending” status and from the older to the newer the emails (one per targeted subscriber) are generated and sent. Those emails create an global email flow which is managed by the delivery engine (with the configured speed), described below.
The Delivery Engine Speed
The delivery engine speed (measured in emails per hour) can be configured on Newsletter configuration panel.
Since the delivery engine runs every five minutes if you set 100 emails per hour about 8 emails are sent on each run. Sometime you can experience a speed lower than what you set. There are a number of tech reason for that, explained later.
PHP execution timeout
Sending emails can be a slow process, specially if the mail service is slow. So Newsletter must check if the process is reaching the PHP execution timeout and stop it self to avoid problems. You can see if that is happening, enabling on diagnostic panel the main log at info level and look at the log files for a “time limit reached” line.
On shared hosting PHP time limit cannot be raised (usually), on dedicated or virtual server it can be raised. For who think the PHP time limit can be changed with a set_time_limit call, remember that PHP (most of the time) is ran as fastcgi process and the fastcgi controller will kill it if it take too longer to end. May be other tech tricks can be used… but for safety the plugin only keeps an eye on this timeout and tries to avoid to pass it.
If the general speed of your server can support 100 email every 5 minutes, even if you raise the engine speed that is your top limit. Nothing else can be do than changing the server.
Is your blog ready to send email?
A blog can send emails in a reliable fashion if the provider has configured a good email system for his customers. Some hosting provider, specially with shared web spaces, have a inefficient mail service which permits only tens of mails per day (it means it will take tens of days to send to a 1000 subscriber list).
Other provider totally disable the mail system in their server.
Big player, anyway, like Hostgator, Dream Host and so on, let you to send a reasonable number of emails from your blog, state that you are able to “throttle” them. It means you must respect the provider limit, for example not more than 100 emails per hour.
GoDaddy, to cite one of the most used providers, has a strict limit of 250 emails per day (not per hour) if things has not changed and it requires the use of an SMTP.
The use of an external SMTP can be a good choice: Sendgrid, Mailgun, Amazon SES, Sparkpost, Elastiemail, Mailjet and so on.
The cron system is working?
A cron system is something that works even if not one is looking at the blog. A cron system can wake up the blog and their plugin regularly, so they can take some actions (like send emails).
WordPress cannot have a real cron system because PHP cannot. The WordPress team, anyway, find a way to emulate a cron system because the need to trigger future or regular event to make the blog work correctly. For example to publish a scheduled post.
Newsletter Delivery Engine relies on WordPress cron system, so we must be sure it is working. When this system does not work as wanted?
- On very low traffic sites
- On sites with cache systems
- On sites with the cron disabled (one click installed blog on Aruba.it for example)
- On sites “blocked” with basic authentication, ip filtering, cookie filtering or other filters which blocks the call to wp-cron.php
Without explain the technical reason of that, let me to indicate the solutions.
First you need to be sure the cron is not disabled (see exceptions below) with a
inside the wp-config.php file. If there is such line of code, delete it. Then be sure you are not blocking the wp-cron.php calls with basic authentication or something like. If you see to keep the blog protected, at least unlock the wp-cron.php call.
To test the wp-cron.php call, try to load it directly from your browser with something like:
Second you should be sure the cron is triggered on a regular base and this is very easy to do just setting up a call to wp-cron.php. There are many ways to do that, let me show a couple of examples.
If and only if you setup a regular external call to wp-cron.php (see below), you can even use the
that can improve the blog server overall loading and avoid overlapping job executions.
Check with a cron manager
You can see the internal scheduler status of your blog using, for example, Advanced Cron Manager. This really useful plugin adds and entry in the Tools menu of WP. It lists the active schedules with some information about their next execution. If the Newsletter schedule is correctly setup you should find something like:
newsletter schedule is not present, try to deactivate and reactivate the plugin.
Using your provider control panel
Most provider have in their control panels the ability to setup a cron job. A cron job is something that will be execute periodically. What we need is an HTTP call to the file wp-cron.php of your WordPress installation. It can be make with:
The php command could be different, for example php72 or like. You should ask the provider. This is the preferred way to trigger the cron since it usually does not suffer from timeout problems
Alternatively you can simulate a real HTTP/HTTPS call with:
wget --delete-after http://www.yourdomain.com/wp-cron.php
Be sure to use the correct protocol,
You can try that address (http://www.yourdomain.com/wp-cron.php) to see if a blank page is returned (it’s ok) or if there is some error report (the address is not correct, PHP errors and like).
To make Newsletter work smoothly, this call should be made every 5 minutes. For example see the Hostgator cpanel screen shot below (copy the values exactly as in the picture).
Note: from the end of 2013 it seems Hostgator does not enable anymore this kind of setup. Only interval of 15 minutes or more are allowed. See below for other services.
Using a online cron service
If you provider cannot be of help in setting up a cron job, you can try to use a free service (usually they have even a counter professional part).
Here a possible list:
- www.easycron.com (see this post – they have specific instructions for Newsletter plugin)
- www.cron-job.org (see this post)