Simplenews: Troubleshooting email sending
Common problems and solutions
My mails are not sent
- Debug as described below
- Contact your host to check for mail limits
Duplicate emails are sent
- Do not use Poormanscron
- Reduce the batch size
Using cron
Cron is required to send large mailing lists. If you have a medium or large size mailing list (i.e. more than 500 subscribers) always use cron to send the newsletters.
Cron settings
To use cron:
- Check the 'Use cron to send newsletters' checkbox.
- Set the 'Cron throttle' to the number of newsletters sent per cron run. Too high values may lead to mail server overload or you may hit hosting restrictions. Contact your host.
Not use cron:
- Uncheck the 'Use cron to send newsletters' checkbox. All newsletters will be sent immediately when saving the node. If not all emails can be sent within the available php execution time, the remainder will be sent by cron. Therefore ALWAYS enable cron.
Mail settings path: admin/settings/simplenews/mail
Poormanscron
Using poormanscron (6.x-1.0) may cause multiple emails to be sent to a single subscriber. The risk of this happening increases with larger batch size, slower server, busier site. It is advised not to use Poormanscron.
Hosting limitations
If you plan to send mailings, check your hosting (website) for mailing restrictions. There are different kinds: max number of emails per minute/hour/day, max number of SMTP connections. And other relevant restrictions such as PHP max execution time and max processor load. All these may affect your cron settings.
Tuning the Simplenews mail system
Use of cron
#what is cron
#cron versus immediate
#why not use poormanscron
limiting the load
#batch size and cron frequency
prevent PHP execution time overrun
#what is overrun + importance of prevention
#how to prevent
#Windows system
Debugging sending emails
- Did you go to the Newsletter tab of the newsletter node you want to send? There is a button to send newsletters there.
- Is only Simplenews not sending emails or also core? Use the contact form to test
path: contact - Is it only newsletters not being sent or also confirmation emails?
turn on the Simplenews email logging. This logs every outgoing Simplenews email in the system log. - Emails may be caught by spam filters. Check you spam or junk mail folder for lost emails. Make sure the domain of the sender address is the same as your website domain. e.g. Website: www.example.com; From address: no-reply@example.com; NOT: no-reply@mysite.com.
- Log emails
Simplenews has build-in email logging. Turn this on to log every outgoing email (both success and failure) in the watchdog log.
path: admin/settings/simplenews/mail (D8: admin/config/services/simplenews/settings/mail) - The system log lists the results of cron batches
example: 500 emails sent in 1.2 seconds.
(Windows systems: 500 emails sent.)
Path: admin/reports/dblog - Is Simplenews only not sending large batches or also single emails?
Don't send any mailing for 24 hours, set the batch size to 1 and send a mailing to a test-list.
If batches of 1 are sent but large batches not, check with your webhost for their email restrictions. - Database
#What is in which table - Email process in code
#simplenews functions
#mail.inc
#hook_mail_alter
#smtp_library - Add a watchdog command into module_invoke_all in includes/module.inc to see what hook_crons were being called at cron time - this'll be shown up in the log
- If emails aren't being sent when cron is running automatically, check whether they run when cron is manually run. If they do, it's not a problem with cron crashing on a module, it's possibly a problem with the cron configuration
- check your cron logs if possible - they're usually in /var/log/cron on a linux machine
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion