How to configure emails in Opencart

There are two general ways how a website can send emails. It can use an internal server function (mail) for it or the email can be sent through an external server (smtp). In Opencart the administrator can choose the email submission type at the store settings page.

Internal Server Mail Function

The internal email submission is preferable because it reduces delays in submission, but in some cases it may fail due to bad server (or dns) configuration. The 'Mail' engine means that internal server submission in Opencart.

Additional mail parameters can be defined on the 'Mail parameters' setting, but you need to consult to your hosting engineer regarding what should be set there. Usually this field is empty.

Sending Emails through SMTP

Mail submission through external SMTP server option looks more simpler to configure and it does not depend on your hosting configuration but it may work significantly slower that in result may affect user experience at your website. The 'SMTP' mail engine option should be selected to use this email delivery solution.

In order to configure the smtp option you need to fill in fields on the same mail settings page. Setting up smtp protocol is similar to configuring a regular email client for sending emails through smtp. All required fields are provided by mail provider (like gmail, yahoo, etc.) you just need to find them in their help articles. For example, for google these parameters may look like this:

SMTP Host Name: (in some cases it may be ssl://
SMTP Username: your full email address
SMTP Password: your gmail password
SMTP Port: 587

You should refer to Google documentation for the latest settings because they may change.,step-change-smtp-other-settings-in-your-email-client
Also, you don't have to supply your mail google account information. It is possible to create special credentials just for your Opencart store. It helps to keep the main account more secure.

How to test email submission in Opencart

There is no special tool for that but you can enable sending an email on user registration and register a test customer account from the front-end. If the 'Customer Registration Alert' is enabled on the settings page, an email should be sent to your administrator account.

When the email is not sent, you can check Opencart logs for clue on what is going on.

If you receive an email on one event but not on another the issue is most likely in the store code and it has to be investigated on the server by a developer.

Please Wait!

Please wait... it will take a second!