One of the many benefits of Caldera Forms is its integrated email functionality. Using Caldera Forms, you can deeply customize the emails that go out to the people who submit the form, the people who must get the form submission, or both. However, the ability of Caldera Forms to send emails is dependent on WordPress’ mailer functionality (wp_mail), which is not terribly reliable across all server configurations.
We do not recommend relying on WordPress alone for ensuring emails from the form mailer, or the autoresponder processors are able to send emails. This article covers what to do instead.
When emails don’t send it is one of several things is to blame. I have listed these below, with troubleshooting steps, as well as alternative solutions that we use and recommend. It also details how to use mailer debug mode.
Too Much To Deal With?
Shouldn’t this kind of thing just work? We asked that question, too. It shouldn’t be like this, but it is. That’s why we built Caldera Forms Pro. One of its main features is enhanced email delivery. Sign up for Caldera Forms Pro today — with a free 7 day trial — and see how easy reliable, spam-free emails can be.
Possible Reasons Why Emails Are Not Sending
First, let’s explore the common causes of poor email reliability:
- Your server can’t send any emails. Are password reset emails working?
- Are you using an SMTP plugin? Have you tried turning it off?
- The address you are sending to is not set properly. Have you double checked your settings? Also, did you try the mailer debug mode (you can turn this on at the bottom of the mailer tab) and see what email address it says emails are sent to?
- Is the phpmailer causing issues? If you enter debug mode, it may report errors.
Most of the time, if your emails from Caldera Forms are not being sent, this is a symptom of a larger problem on your site. The solutions that we recommend below should allow you to avoid the root problem for your whole site.
The other common situation that can lead to unsent emails, is invalid email addresses being provided. This can happen when using magic tags to provide the email address if they are not configured properly. The mailer debug function, discussed below, is useful for ensuring that you are actually sending a valid email address to the mailer.
Solution: Set Up An Email Alternative
Email alternatives ensure that emails sent from your WordPress site, not just from Caldera Forms, are actually sent, then we strongly recommend a third-party transactional email service such as Mandrill API or SendGrid from MailChimp or an external SMTP server.
Mandrill is a paid add-on for MailChimp. SendGrid has a free tier (scroll to the bottom of their pricing page) that supports up to 12000 emails a month.
The Mandrill API allows you to use the infrastructure built for MailChimp. If their infrastructure can handle the billions of emails that MailChimp sends every month, it can handle your site. The wpMandrill plugin is free and easy to set up.
The plugin is only listed as being tested up to WordPress 3.8, but it works perfectly fine on this site, and many others we have used it on.
Debugging Emails In Caldera Forms
In the Caldera Forms mailer tab, there is an option for enabling mailer debug. This enables logging of email details. It should not be left on, as it causes duplicate emails. When it is enabled, it adds php mailer logging to the entry viewer for the form.
This is information that will be useful to a server admin. You can provide this information to your webhost’s support service if you are having problems sending emails.
The debug mailer is also a reliable way to find out what email addresses, if any, are being used to send to and for the reply-to.
If That Doesn’t Work
If none of the above advice works, then this most likely means that no valid email is being passed to the recipients field in the mailer. Why this is happening is hard to say without testing. It could be happening for one of several reasons:
- Your mailer is not properly configured
- A conditional field is not filled in
- A processor is returning an error
- There is a server-side PHP error that is preventing Caldera Forms from getting to that point in execution
At this stage, to gather more detail, you should ensure that WP_DEBUG and WP_DEBUG_LOG are defined as true, and install this plugin. Then attempt to send a message again. This should create at least one, if not two entries in your WordPress debug log. If you are unfamiliar with debug logging, please see this article.
This plugin will log data about emails that Caldera Forms is attempting to send. If the mailer is executed it will log who it attempted to send to. If the email fails, a second, almost identical log entry will be made.
Here is how to interpret one of three possible results:
1) No entries are made. This either means that you have not enabled debug logging, or something is breaking form execution before the mailer. Presuming debug logging is properly configured, this means the problem is not likely related to the mailer.
2) You see one entry, marked “pre_send” in the debug log, per form submission. This means that mailer reported that it was working. It will also show you the recipients. If they are correct then you have a email configuration error on your server or external email service.
3) You see two entries, per form submission. This means the mailer reported a failure. Most likely this was because the recipients are not valid. You should see what was attempted to be used for the recipients.
Try Caldera Forms Pro
We know these are a lot of steps, and that for the less technical among us, this is not how we want to spend our time. After supporting Caldera Forms for two years and answering this question time and time again, we decided we could do this better. That’s how Caldera Forms Pro was born. Try it today — the first 7 days are free.