When I started to use MailPoet I had to face to two problems with the default configuration :
- My Newsletter was sometimes sent twice or multiple times
- My newsletter was filtered by spam filters
These problems are very common if you have a basic usage of MailPoet. The first one comes from the default mechanism MailPoet use to send your newsletter which depends on your traffic and your server capabilities (Memory, number of mails allowed to be sent per day or hour). The second one comes from the fact that you have a non “verified” SMTP Server IP or a shared SMTP Server IP (That’s the case if you have a mutualized hosting). In that way if someone using the same server is spamming people or doing wrong things, your server will be blacklisted … and this will impact your own site.
Configure Mailpoet with SendGrid.
- Register for free on Sendgrid (send 400 email /day for free)
- Validate your account on Send Grid
- Go to the Settings tab of MailPoet and then to “Send With”
- Select Third-Party
- Configure Mailpoet with the following parameters:
SMTP Host Name : smtp.sendgrid.net
Your Send Grid login and password
Select Web API
Select up-to 500 e-mails every 30 minutes.
That’s it your Send Grid accounts is now connected to MailPoet.
In addition, you can take advantage of the free analytics dashboard of Sendgrid which provides additional information to the free MailPoet Dashboard.
Configure your own sending mechanism using CRON Job
- Go to the Settings tab of MailPoet
- Go to Advanced and then click on Geeky options
- Select “Enable MailPoet’s Cron” and choose “I’ll setup a cron job on my server to execute at the frequency I want.”
- Copy the link given by MailPoet at this step.
- Go to your Hoster Administration Web Page (OVH in my case)
- Click on your domain name in the Platform Section
- Go to the CRON Tab
- Add a Task
- Script Path : ./scripts/newsletterWeeklySend.sh
Email notification : No
Description: Cron Script to send the Weekly Newsletter
Configure the frequency as you want and save.
- Open Notepad, Smultron or any basic text editor
- Copy Paste the following script (Don’t forget to put your own MailPoet Link in it)
UA=WgetCron-ViaPlanificateursTachesOVHwget -nv -U $UA -O /dev/null $TARGET >/dev/null 2>>$ERRLOG
- Save this script as newsletterWeeklySend.sh
- Connect to your FTP Server
- At the same level as your www folder, create 2 new folders called “scripts” and “logs-scripts”
- Upload newsletterWeeklySend.sh into scripts
That’s it your cron job is now configured. You should not have any Spam Filter or multiple send of your Newsletter.