Tutorial 4 - Email Settings in OpenCart
OpenCart Email setup can be tricky on some hosting server configurations. In this tutorial, we will share about setting up email in OpenCart and troubleshoot some errors that occur when setting up email. Either using email protocol or SMTP, SSL or non SSL.
In the Opencart online shop system, the email function plays a role in sending notifications to customers about orders, new customer accounts, contacts, etc. The first time you have to do after installing Opencart is that you have to set up your email system so that sending email can run normally. If you don't set up your e-mail system properly, you can be sure that notification e-mails and orders will not be sent.
Common problems encountered when email settings are incorrect are:
- No email is sent during registration, checkout, order status updates, etc.
- Errors on pages requiring email delivery, such as the register page and checkout page.
Intro - OpenCart Email Settings
During our career at OpenCart, email setup was usually a bit complicated due to the hosting server configuration. Some hosting servers do not allow the use of the mail () protocol in e-mail services.
Default email settings on OpenCart |
- If the hosting server disables the mail () function in PHP, the email will practically not be sent.
- If the hosting server allows the use of mail (), it will usually send out fine. It is only possible for spam to arrive on some of the destination email servers.
Email setup with SMTP in OpenCart
1. Create a Personal Email Address
create a private email address domain via CPanel |
After that, look at the SMTP configuration on the server. How:
SMTP settings on the server |
SMTP server settings |
2. Mail tab
3. OpenCart SMTP Mail Settings
- Mail Parameters, use: -f {email_address}. Example: [email protected] or leave the default value blank
- SMTP Hostname, see the settings in your cpanel. add ssl: // or tls: // if you are using SSL. example ssl: //mail.yourdomain.com. if not using SSL for example: mail.yourdomain.com
- SMTP Username, fill in the private email address that you created above. For example: [email protected], if you want to use sending email from that email
- SMTP Password, the private email address password that you created above.
- SMTP Port, the port according to your hosting settings. For SMTP with SSL 465 and for non-SSL 587 SMTP
- SMTP Timeout, leave the default 5.
- Additional Alert Email: fill in another email address for cc email notifications, for example your gmail email or something else. If you use more than one email, separate them with a comma (,) for example: abcd @ gmail.com, abcd @ yahoo.com
Setting SMTP with SSL on OpenCart |
Setting SMTP with non SSL on OpenCart |