Email Notifications

  • JNext lesson
  • KPrevious lesson
  • FSearch lessons
  • EscClear search

Core Forms provides two email-related actions: Send Email for notifying administrators and Auto-Responder for sending confirmation emails to submitters. All emails are logged for delivery tracking.

Send Email Action

The Send Email action sends a notification when a form is submitted. This is the most common action and is typically used to notify the site owner about new submissions.

Configuration

  • From – The sender email address. Defaults to the WordPress admin email. Supports data variables like [email].
  • To – The recipient email address. Defaults to the WordPress admin email. You can enter multiple addresses separated by commas. Supports data variables.
  • Subject – The email subject line. Supports data variables.
  • Message – The email body. Supports data variables including [all] and [all:label] to include all submitted fields.
  • Content Type – Choose between text/plain and text/html.
  • Additional Headers – Add custom email headers like Reply-To, Cc, or Bcc. One header per line. Supports data variables.

Example Configuration

Subject:

New contact form submission from [name]

Message:

You received a new submission from your contact form.

[all:label]

Submitted at: [CF_TIMESTAMP]
IP Address: [CF_IP_ADDRESS]
Referrer: [CF_REFERRER_URL]

Additional Headers:

Reply-To: [name] <[email]>
Cc: manager@example.com

Dynamic Recipients

The “To” field supports data variables, so you can route emails based on submitted data:

[department_email]

If your form has a dropdown named department_email with options like sales@example.com and support@example.com, the email goes to whoever the user selected.

Auto-Responder Action

The Auto-Responder sends a confirmation email to the person who submitted the form. This lets users know their submission was received.

Configuration

  • Recipient Email Field – The name of the form field containing the submitter’s email (e.g., email). This is required.
  • From Name – The display name for the sender. Defaults to the site name.
  • From Email – The sender email address. Defaults to the admin email.
  • Reply-To Email – Where replies to the confirmation email should go.
  • Subject – The email subject. Defaults to “Thank you for your submission”.
  • Message – The email body. Defaults to a message that includes [all] to show the user a copy of their submission.
  • Content Type – Choose between text/plain and text/html.

Default Auto-Responder Message

Hi there,

Thank you for contacting us. We have received your submission and will get back to you soon.

Here is a copy of your submission:

[all]

Best regards,
{Site Name}

Email Logging

Every email sent by Core Forms is logged to the wp_cf_email_logs database table. This includes both Send Email and Auto-Responder emails.

Viewing Email Logs

Go to Core Forms > Email Logs to see all logged emails. The log shows:

  • Recipient email address
  • Subject line
  • Status (pending, sent, or failed)
  • Error message (for failed emails)
  • Date and time
  • Associated form and submission

You can filter logs by form, status, date range, or search by recipient/subject.

Email Statuses

  • Pending – The email has been queued but not yet sent.
  • Sent – WordPress’s wp_mail() function returned true.
  • Failed – The email failed to send. The error message from PHPMailer is stored in the log.

Log Cleanup

Old email logs can be cleaned up using the cf_delete_old_email_logs() function:

cf_delete_old_email_logs( 90 ); // Delete logs older than 90 days

Replying to Submissions

From the submission detail view, you can compose and send an email reply directly to the submitter. Replies are sent via wp_mail() and stored in the wp_cf_submission_replies table.

Reply Configuration

The default “From” email for replies is set in Core Forms > Settings > Reply From Email. If not configured, the WordPress admin email is used.

Viewing Reply History

Each submission’s detail view shows a threaded history of all replies sent, including who sent them and when.

Email Filters

Send Email Action

  • cf_action_email_to – Filter the recipient address
  • cf_action_email_subject – Filter the subject line
  • cf_action_email_message – Filter the message body
  • cf_action_email_from – Filter the sender address

Auto-Responder Action

  • cf_action_autoresponder_to – Filter the recipient address
  • cf_action_autoresponder_subject – Filter the subject line
  • cf_action_autoresponder_message – Filter the message body
  • cf_action_autoresponder_headers – Filter the email headers

All filters receive the current value and the $submission object as arguments.