You’ve got your form all set — maybe it’s even been live for a while, even a long while. But email notifications are not being sent or received. This is a common issue on WordPress sites, and we have a recommendation for fixing it.
How emails work on default WordPress
In default WordPress, emails are sent by the “PHP mail” function. This means that the server where your site is hosted tries to send emails out using the Admin email set in Settings > General. If your email happens to be hosted on the same server as your website, this may work well.
But modern best practice might be to host your email accounts on a different server or platform, like Google Workspace or Office 365. Or you might be using a gmail.com email for the admin email. In these instances, there is a “mis-match” of authentications, and emails may not send, or may only be received sporadically depending on the recipient’s email address.
This problem sending emails is not just sending Gravity Forms notifications, but all emails from the website. This might include password reset emails, administrator notifications, customer receipts and more.
How to fix this
In order to send emails more reliably, the website needs to be configured to bypass the default WordPress sending through PHP mail and to send out emails using a third-party SMTP email sender. The website will not trigger PHP mail, but instead will send the email via an API connection to the sender platform, who sends it out on behalf of the website.
Use a third-party sender directly
One way to do this is to set up a third-party SMTP email service directly. Two really respected and affordable senders are SendGrid (which has a free level), and Mailgun.
We strongly recommend setting up your SMTP sender on a subdomain of your main domain. This allows your “company-name.com” email to be hosted at your email provider (like Google Workspace), but then “@site.company-name.com” to be the domain that the website uses. You can use any subdomain you wish. We often use “mg.company-name.com” when we are using Mailgun. Just make it short and be aware that your customers will be able to see the full subdomain.
Typically, no one is really using that subdomain email for anything else. The website sends out Gravity Forms notifications, password reset emails, etct. using that sending domain, but it doesn’t have a “real inbox” for people to receive or send from. This means that in Gravity Forms, you will want to be sure you set a designated “reply to” email that is a real inbox.
Use Gravity SMTP
Gravity Forms has in beta testing a new plugin called “Gravity SMTP”, which will allow for easy set up of SendGrid and other third-party SMTP providers. At the writing of this post, that new plugin is still being tested, but it’s anticipated that it will be released by the end of 2023.
Advantage of SMTP senders: logs
One big advantage of using a third party SMTP sender, whether you use a sender directly or through Gravity SMTP, is that you get a log of the emails sent, and in some cases tracking information.
This can be invaluable for troubleshooting. For instance, perhaps someone who is supposed to be getting emailed notifications of a form submission complains that they aren’t receiving them. With access to a log, you might be able to see that the emails are being marked as spam, or that the person has a full inbox.
Gravity Assist can help
If you would like help setting up a third-party SMTP provider or any other help with Gravity Forms, Gravity Assist can help. We delight in solving complex Gravity Forms puzzles. Reach out with your Gravity Forms issues today!