Is it better to use a WP SMTP plugin or the SMTP addon from Cloudways?


#21

Hi Lucash, thanks for the info. For me that is not a solution, because I have 2 sites on a single server and both sites need different SMTP settings. The SMTP addon with Cloudways combined with the plugin as you suggest works, but is configured per server, not per application.

I think there is no real solution to the slow e-mailing with Office 365, I think it is related to Office 365 and not really to Cloudways anyways. However, I have a nice workaround you could try if you have multiple applications and need different settings per application.

The workaround I came up with is by using a mail queue plugin, the only one I found is: https://wordpress.org/plugins/smtp-mailing-queue/. I tested it on WP 4.9.x and it works great. I have setup a custom cron job that runs every 5 minutes to process the queue, but you can make the interval faster like every 2 minutes. This way, users might have to wait a couple minutes before the mail arrives (because it is in a queue), but there is NO delay whatsoever on your site / store frontend. You can configure SMTP settings in this plugin so you can configure it for Office 365. This way you don’t need the CW SMTP add-on and you can setup per-site SMTP settings.


#22

@contact9, thanks for the workaround! I have the same situation on another server (three sites) needing mail sent. When I get a chance I want to try this. The hardest part for me will be figuring out the cron job.


#23

@lucash you’re welcome. The cronjob is easy to setup. You can also configure it without cronjob and it will run when WP cron runs, however, I prefer a custom cronjob because you will be sure it sends mails every X minutes (if there are mails in the queue). Configuring this on Cloudways is fairly easy, you can do it like this:

  • In the plugin go to Settings > SMTP Mailing Queue
  • Go to the tab ‘Advanced settings’ and check ‘Don’t use wp_cron’
  • Below this field, you will see a URL: call https://…?smqProcess… > you need this URL later for the cron
  • Now go to Cloudways and open your app in their portal. From the app management click ‘Cron Job Management’
  • Click the advanced tab and add the cronjob below on a new line:

*/3 * * * * wget -q -O - " https://www.the-url-from-the-plugin?smqPorcessQueue&key=XYXYX&t=date +\%s" > /dev/null 2>&1

That’s it. The 3 in this case means every 3 minutes. You can change it to */5 for every 5 minutes for example. Make sure to replace https://www.the-url-from-the-plugin?smqPorcessQueue&key=XYXYX with the URL that the plugin suggests. Also make sure there is no space between " http… so the cronjob should start like this: */3 * * * * wget -q -O - "http…

My example above contains a space but that’s because otherwise the editor here will format it as a quote.


How can I set Breeze not to cache data related to the mail queue?
#24

I just started on Cloudways/DO two days ago and I’m wondering the the Cloudways SMTP addon works differently depending on the server vendor. I am using mailgun for SMTP. I did a test first with enabling the SMTP server addon (no wordpress smtp plugin) and tried sending email via a contact form. I tried twice and didn’t receive an email. I then turned off the SMTP addon and added the WP SMTP plugin and tried the contact form again. Then it worked and I got an email. The other two emails eventually arrived - one 20 minutes later, the other 80 minutes later. I figure for now I’ll use the plugin!


#25

If you can allow yourself to stretch the budget, get Sendrid and forget about SMTP all together. Much easier to setup and much more powerful on Sendgrids website end. We use it all of our clients. The main clients have dedicated IP to prevent suspensions if one were to occur.