I help a family member run a website for a small business and we recently discovered that the contact form notification emails were not being delivered. The contact submissions were in the Feedback section of the dashboard, but the notification emails were not being delivered to the email address on the form.
Domain Registrar: Namecheap
Web host: Namecheap
cPanel Version: 11.40.1 (build 13)
DNS: Namecheap hosting servers
Email: Google Apps
Contact Form: Jetpack
Contact email: Generic Gmail account
- If I changed the contact email address to one of the domain’s existing Google App email addresses, the contact form notifications were delivered
- If I added a new 0 priority MX record of mail.domain.com, the notifications were delivered to any email address (but this breaks the Google Apps email)
- I looked in the webmail account for the the standard WordPress notification email address (firstname.lastname@example.org) and found 60+ emails with the this subject:
Mail failure – rejected by local scanning code
The body of the emails contained the following:
A message that you sent was rejected by the local scanning code that
checks incoming messages on this system. The following error was given:
“Relaying not permitted”
I spent a couple hours playing around with the WP-Mail-SMTP plugin, Google App settings, cPanel settings and nothing was helping.
My initial thought was that the MX record shouldn’t affect outgoing email, but I was wrong. Finally, I found a Namecheap support page which explained the problem:
..to send emails from our server, domain should be added to it and have MX records pointed to the server where this domain is hosted.
To summarize: Email generated by the server will not be sent unless the domain is added to the hosting account AND the MX records point to the same location.
- Create a subdomain (because the subdomain isn’t setup with Google Apps)
- Install the WP-Mail-SMTP plugin
- In order to force outgoing emails to use the subdomain, configure the plugin as is explained on the Namecheap support page
Once I completed the setup, the email notifications were fixed. I had a hosting account on Bluehost for years and I never ran into this issue, so I’m assuming that they don’t have the same limitation on emails. Has anyone else run into this issue with other shared hosts?