Sending an email in WordPress happens as a chain of events. Any time a form that contains an active email action is submitted, the email action triggers and Ninja Forms passes the form data through WordPress and to your host. Your host takes the data passed to it, packages it as an email, and sends it.
If your email isn’t delivering, or is delivering but doesn’t look or behave like you’d expect it to, there’s a breakdown somewhere in that chain of events. The two most common places for a break to happen are:
- In your Ninja Forms email action
- As the email data is managed and sent by your host
This document focuses on the Ninja Forms email action. If something is misconfigured or broken here, following this guide will help you catch and fix it. If everything checks out with the email action, we’ll also recommend what to do next to get your emails behaving properly at the end of this document.
Troubleshooting the email action
1. Confirm your email action is present and active
Your email action lives on the Emails & Actions tab of the form builder. All forms start with a default action called Admin Email. Whether you’re using the stock action or one you made yourself, be sure it’s active: toggled on (green / button moved to the right).
If you don’t have an active email action on your form, no email will be sent when the form submits.
2. Check your email action settings
Click on the email action to open its settings window.
Action Name: this is just the display name for the action in the builder. It has no impact on email deliverability.
To: the default action will contain {wp:admin_email} here. This is a merge tag that will tell the form to use the email address that you’ve set as the Administration Email Address in WordPress (Settings > General in the WP admin). A merge tag for the email field, if the form has one, or any properly formatted email address will work in this field also. Anything other than one of those options will cause email to fail.
Reply to: any valid email address or the merge tag of the email field, if the form has one, will work for this setting. Anything other than that may cause the email to fail. If the email is sending but, in your inbox, Reply To is not using the email you’ve set here, then there is likely an issue with how the email has been packaged and sent by your host. In that case, please see our documentation on Improving WordPress Email Deliverability.
Subject: All emails must have a subject line or the email will fail. Avoid using all caps, unnecessary punctuation marks, and language that comes across as common marketing spam. These will often not cause the email to fail, but increases the odds you land in a promotional or spam tab/folder depending on the receiving email service.
Email Message: your message won’t have any impact on deliverability as long as you avoid spammy practices an email service will flag, like hiding links with non-visible font colors, excessive links, excessive image to text ratio, etc. The default {fields_table} merge tag will populate the message with all field values provided by the person filling out the form. Blank submissions will result in a blank message when using that merge tag. {all_fields_table} will include blank fields and fields with submitted values.
3. Check your email action’s Advanced settings
If you do not have Dev Mode enabled, expanding Advanced at the bottom of the email action settings will only show the Add Attachment option. Attachments might be stripped or cause the email to land in spam if the file type of the attachment is an uncommon one.
If Dev Mode is enabled for your form, you will see additional options here:
From Name: if you are experiencing deliverability issues, remove any data in this setting. Manually defining this setting here may cause some email providers to reject the email.
From Address: if you are experiencing deliverability issues, remove any data in this setting. Manually defining this setting here may cause some email providers to reject the email.
Format: this setting should have no bearing on deliverability.
CC/BCC: this setting usually won’t cause email to fail, but it may be stripped by your host or not be respected by your email provider. If your email is sending but CC/BCC isn’t working as expected, please see our documentation on Improving WordPress Email Deliverability.
Test to confirm that Ninja Forms is passing email data correctly
Remember that email is a chain of events. Think about it like this:
- Ninja Forms > WordPress (your server/website) > Your Host > Inbox.
There are plugins you can install to test to make sure that the email data is making it to your host. WP Mail Logging is the one we recommend. It’s very simple to use. Just install it and submit your form. The email chain is triggered and recorded by WP Mail Logging in your WP dashboard. If there’s an error in the handoff, you’ll see it there:
If you DO see an error, then we can help you troubleshoot this. Please hit us up in our support channel and let us know what you’ve done so far.
If you DO NOT see an error, then the email data is being passed successfully to your host and the issue is between your host and the inbox. This does not mean your host is doing a bad job, it just means you should use a service that specializes in sending email. Find out how to do that in our Improving WordPress Email Deliverability documentation.