'Opencart- order emails and enquiry form email ending up in admin's junk mail folder

New order emails and enquiry form emails, both ending in admin's spam/junk folder. I am not able to rectify it. Using 'mail' configuration instead of 'smtp' in the console. Have put '-F' in front of mail parameters. Tried using the port '587', '465' for for smtp.office365.com. Need help!



Solution 1:[1]

For those running into this issue with OpenCart here are some things you should verify.

Ensure your email address in System->Store->Email matches the email used in System->Mail->SMTP Username

In System->Mail->SMTP Hostname you may need to add the prefix "ssl://" or "tsl://" before your mail.servername.com this is not very clear and easy to miss if you're not sure which one to use, try ssl:// first then tsl:// and send yourself a test email with the contact form.

If using Cpanel, ensure there is an SPF record for your domain. This is found in Cpanel->Email->Email Deliverability

To test if emails are actually working the best way is to login into a test account and send a "Contact Us" email. If the page goes blank after submission, there is likely an issue with settings.

I have found using the OpenCart Default "Mail" setting will always result in emails being marked as spam, so you'll need to get in there and set them up with SMTP.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nodsdorf