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


#4

Hi @lucash

Since you are using Vultr that has port 25 blocked by the provider itself. You should set up an SMTP plugin. We have written two guides, kindly have a look and let me know if you need any further assistance.



#5

Thanks, Dillyn. I enjoyed the opinion on G Suite. Our org recently switched to O365 from Google. I don’t usually miss G Suite, but there are a few things Google does better.

You asked, “have you tried port 25 or 587 over TLS?”

I tried port 587, as I think that’s what Microsoft requires. The trouble seems to be that I can’t specify TLS in the SMTP add-on.


#6

Thanks, Musaasam. I had a look at your guides.

As I mentioned above, I’m not able to specify TLS in the Cloudways add-on. I did use port 587. For now, I’m back to using a WordPress SMTP plugin. That has been reliable so far, but it does seem to take longer to complete an action like submitting a form which fires an email.


#7

You may need to try 465 over SSL. It could be a configuration problem or bug with TLS from cloudways. I’ve noticed some similarities with other hosts like SiteGround. I have to use 465 over SSL with them as well because TLS over Guzzle almost never works for some reason, haven’t figured out why yet.


#8

Hi,

Hope you are doing good. Port 25 is blocked on Google Compute Engine and Vultr hosted servers. Secondly, TLS and SSL connection depends upon your SMTP provider. Cloudways works fine with all 25(except GCE and Vultr), 587,465, 2525. You can easily check which port your external SMTP host is allowing using the following steps .

  1. Connect your server via SSH
  2. telnet smtp.provider.com
    e.g telnet smtp.gmail.com 587

If it is showing you 220 response, it means that host allows connection on that port. You can simply use that port in SMTP plugin or SMTP addon.

P.S enter quit at the end of telnet command otherwise it will not close the telnet session

Kind Regards


#9

Hi @lucash

Can you please try out what @faizan.khan suggested?


#10

I am using Elastic Email, but don’t you have to have the addon enabled at Cloudways, AND have an smtp plugin installed on the wordpress site? That’s how mine’s set up. Are you saying the WP plugin isn’t needed?


#11

Too late to the party :wink:

If you’ve set up SMTP at the addon, then you don’t need to use an SMTP plugin on Wordpress. When the SMTP addon is configured, any PHP app that uses the mail() function will automatically redirect to the SMTP server configured there.

Also, Elastic Email is a good choice as their default port is 2525.


#12

@eu1, Kind of confused as to what you’re saying here.

This is what my SMTP looks like on Cloudways, but there’s no authentication information, just a host and port.

I’m using the plugin WP Mail SMTP on my wordpress site, and here’s a screenshot of its configuration (that is working)

Notice the port is 465, and the host is the same. And of course there’s username and password credentials. So I’m really confused about the SMTP setting in CloudWays, and even more confused that you’re saying I don’t need the WP plugin??


#13

Your Cloudways settings screen looks like this because you’ve already set the authentication information. If you need to change them, you have to click Remove so you can enter them again.

With that you don’t really need to use an SMTP plugin with Wordpress, but you can use one anyway if you want to.


#14

Thanks to all of you for your input.

I just tried this again and still can’t get emails to send using my Office 365 SMTP account. Back to a WP plugin. I wonder if it has to do with the TLS demanded my Office 365. I know it would work with Gmail, but I’ve set up a custom alias in Office 365 that integrates with the rest of my workflow, so I’ll stick to it.

It’s a pity, because the WP plugin seems to send slowly.


#15

Why isn’t authentication needed in the cloudways setup for smtp?
And why is the port different in the wordpress plugin and the cloudways setup, but the host is the same?

Can I stop using the wordpress plugin?


#16

Authentication is ALWAYS needed. As per your screenshot, it won’t show auth info because it was already entered before. If you need to change it, you have to click REMOVE and then set it up again.

If you do that, Cloudways will ask for auth info, port, hostname, etc. You can stop using the plugin if you set up SMTP correctly.


#17

Hey Lucash, I have had the exact same issue as you have I think. Using SMTP addon I couldn’t send e-mails at all for Office 365 SMTP settings. Using a WP plugin it was terribly slow and slowed down my checkout proces with maybe 30 seconds for example.

So I contacted Cloudways support and now they have fixed something on the server. Don’t know what, but now the SMTP addon is working on the server and e-mails are delivered fast over Office 365 SMTP. Suggest you / anyone else having this issue contact Cloudways about this as well. Hopefully they will fix this by default in the future. My Ticket # is 92947 if anyone needs to refer Cloudways to this issue.


#18

Thank you, @contact9! I will try that.


#19

I am using Sendgrid for this, while its not the cheapest the amount of tools for monitoring, Mailchimp intergration with it, whitelisting and so forth makes it worth every penny. With a dedicated IP safety is also increased. Running quite lot of my apps through Sendgrid.

Everytime I tried to use SMTP, specially with WP installs I had issues, delivery failures and what not. GMAILs free SMTP is pretty decent however.


#20

For others encountering this problem, I’ll share the results of my ticket with Cloudways: Cloudways told me that even though I had their add-on activated, I needed to use a WordPress plugin as well (WP Mail SMTP) and select the PHP option: http://prntscr.com/jajeko
This is contrary to what some in this thread and elsewhere have indicated, so perhaps it’s due to something unique to my setup or Vultr.


#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?