OpenCart 3 Mail and SMTP settings

In this post I'll explain how to setup Mail and SMTP settings for your OpenCart 3 store.
First, why would you need this?
OpenCart uses PHP Mail functions by default, so most site will not need to alter anything when it comes to emails. But sometimes, you may need to use SMTP to send out mails from your store because your web host has blocked PHP Mail or you are using a 3rd party mailing service that you need to connect to in order to send your transactional emails (user registrations, forgotten password, etc).
Also, from what I found out only recently, using SMTP reduces the chances of your website emails from being marked as spam.
Here's how to set it up...
If you have your email account details on hand, jump to Step 5
Get your Account Settings
Step 1
First, get your Account Settings from your Webhosting cPanel or Equivalent. If you don't have access to it, then contact your webhost.
Step 2
For cPanel, you just need to login to www.yourdomain.com/cpanel
Step 3
Then click on Email Account. Scroll down to the email account you wish to use, and click on Set Up Mail Client.
Step 4
Scroll down to Mail Client Manual Settings to get the settings.
OpenCart Setup


Step 5
Now go to your OpenCart server at yourstore.com/admin and login
Step 6
Click on System > Settings

Step 7
Click on the Mail tab

Step 8
Under Mail Engine, select SMTP
Step 9
Mail Parameters: When you are using the Mail option you can add additional parameters like so: -f admin@yourstore.com
Step 10
SMTP Hostname: This will be the hostname that you got from you email account settings above. Remember, if it a secure connection, then make sure to enter tls://
or ssl://
prefix as needed.
Step 11
SMTP Username: Enter the username as seen in your account settings you got from above
Step 12
SMTP Password: This is your password. If you are using Gmail, then you may need to setup a secure password specific for your OpenCart 3 store. You can do that here: https://security.google.com/settings/security/apppasswords
Step 13
SMTP Port: You can leave this as-is. Except for some reason your webhost changed this.
Step 14
SMTP Timeout: This can also be left alone.

Step 15
Alert Mail: Select the appropriate checkbox if you want to receive emails each time you get a New User Registration, Affiliate Signup, New Orders or Reviews
Step 16
Additional Alert Mail: Finally, if you want other emails accounts to receive the emails your OpenCart store sends out, then enter them here like so: email1@exmaple.com, email2@example.com
Remember to separate them using comma (,)
That's all there is to it! You have now successfully set up your SMTP or PHP Mail on your OpenCart website.
Leave your comment