Opencart Emails Not Arriving When Using SMTP

Posted by James on October 12, 2017

We have mentioned previously about issues which can cause your OpenCart emails to fail when sent using SMTP. Unfortunately this is a fairly common problem that can have lots of possible causes, below I detail another new (to us!) cause.

Recently I was working on a site which had been using SMTP to send emails and had suddenly stopped working. My initial thought was that Google might have changed their required permissions or added a setting, but this wasn't the case. I also double checked the credentials on the Opencart admin area but they were fine too. After a bit of digging I came across a setting buried within the WHM control panel which was causing the issue (this setting is enabled by default and must have been added in a recent update). Below are the steps to fix:

Step 1: Login to your WHM panel and navigate to Tweak settings.

cb33efda4-mod.jpg

 

Step 2: Find Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) and set the value to 'off'

625673d0f-mod.jpg

 

Step 3: Save and try to send an email!

 

Obviously the above is only applicable if your server uses cPanel/WHM, if however you are on a shared hosting platform and don't have access to WHM, you can contact your hosts to make the change.

Unfortunately in my experience sending mail via SMTP, especially when using a gmail account, can be a bit of a nightmare to setup and maintain. In most circustances it's preferable to use the built in PHP mail functionality (server permitting). If you do find emails are ending up in spam folders, DKIM and SPF can help authenticate your emails and reduce their spam score.

If the above doesn't solve your problem please check out our other articles 

Contact Form Not Sending Email

OpenCart Not Sending Order Emails

If you're still having problems please send us an email at [email protected], we will be happy to have a look.

blog comments powered by Disqus