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
First, get your Account Settings from your Webhosting cPanel or Equivalent. If you don't have access to it, then contact your webhost.
For cPanel, you just need to login to
Then click on Email Account. Scroll down to the email account you wish to use, and click on Set Up Mail Client.
Scroll down to Mail Client Manual Settings to get the settings.
Now go to your OpenCart server at yourstore.com/admin and login
System > Settings
Click on the Mail tab
Under Mail Engine, select
Mail Parameters: When you are using the Mail option you can add additional parameters like so:
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
ssl:// prefix as needed.
SMTP Username: Enter the username as seen in your account settings you got from above
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
SMTP Port: You can leave this as-is. Except for some reason your webhost changed this.
SMTP Timeout: This can also be left alone.
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
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: firstname.lastname@example.org, email@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.