Why website emails going to spam or not delivered?
Problem
There are 2 typical cases of failed email delivery:
Case 1) When emails with Activation code or Password reminder or any other useful or required information going to SPAM or Junk folder or simply not delivered
Case 2) When mail server is not delivering email due to the problem "Relay access denied" in logs
Solutions
Case 1)There are 2 options to improve email delivery:
1.RECOMMENDED: Use 3rd party mail delivery service, for example Mailgun.
Setup account with Mailgun service
Use FTP access to open file httpdocs/WEB-INF/conf/webvideo-base.conf
Search for smtp keyword to find lines for SMTP settings
Update value for smtp settings to use mailgun or any other mail service
Re-login as admin to apply changes.
Advantages:
emails can be sent without any restrictions on the number of emails
you will not need to use third-party services, and therefore pay for them
Disadvantages:
paid service
2.OPTIONAL: Improve domain name and network settings to get better delivery from localhost
Set up SPF record for your domain name:
TXT "v=spf1 include:yourdomain.com ~all"
(replace yourdomain.com with your real domain name)Setup Reverse DNS
A service to validate the SPF record for a domain name: https://mxtoolbox.com/spf.aspx
Advantages:
more reliable delivery of emails
regular monitorinf of changes in the rules for delivering bulk messages
provide an interface to simplify setup
Disadvantages:
implies a constant adjustment of settings, since mail services regularly change the rules for sending emails
does not exclude the possibility of emails getting into spam
Case 2) If you see Relay Access Denied in maillogs and there are no emails delivered make sure to whitelist 127.0.0.1 in mailserver settings at Plesk