Opencart lets you to send email by:
- PHP Mail (sent from web server)
- or SMTP (usually sent from another server)
PHP Mail VS SMTP which is best?
Both work well although PHP Mail is usually faster and already setup on most servers.
- The problem with sending emails using PHP Mail is that it gets sent from your website/server using the hostname they provide and not your domain name.
+ SMTP is more reliable and less likely to end in your customer's junk folder.
+ SMTP account will also usually include extra DNS settings to validate your domain further with an SPF record and DKIM signature.
[OPTIONAL] You can install phpMailer to replace opencarts Mail class. Works in a similar way although it ensures extra email headers are included (SPF, DKIM) and fixes old display issues on Apple Mail showing an empty preview in the inbox. Download free opencart extension:
[OPTIONAL] Admin Multi Mail SMTP adds the Mail tab to additional stores too. Download free opencart extension:
Setting up your emails with Opencart can be very easy.
- Login to your Opencart Admin and go to System -> Store Settings - Mail tab.
For testing you can use a google mail address as a SMTP settings below but for live site it’s recommend using an email address ending in the same as your domain name.
Mail Protocol: SMTP
SMTP Host: smtp.gmail.com
(try with: ssl://smtp.gmail.com or tls:// smtp.gmail.com)
SMTP Username: firstname.lastname@example.org
(try with: @googlemail)
SMTP Password: p333&&^w000rd
(If 2 step authentication's enable you’ll need a google specific application password instead)
SMTP Port: 465 (465=SSL // 587=TLS // 25=standard)
- Login to Gmail go to account 'Settings' check that 'Forwarding and POP/IMAP' is Enabled IMAP and/or POP.
DKMI - DomainKeys Identified Mail
DNS - Domain Name System
SMTP - Simple Mail Transfer Protocol
SPF - Sender Framework Policy
A nice article explaining this further here: