Send Email

The ‘Send an Email’ action lets you send any number of emails to recipients when a form is saved or submitted.

This action is fully configurable and allows you to:

  • Choose HTML or Plain text email format
  • Specify the sender*
  • Specify one or more recipients*
  • Specify one or more CC and/or BCC recipients*
  • Enter a reply-to email address*
  • Set the subject*
  • Edit the email using the WordPress visual editor or raw HTML*
  • Attach files (uploaded files or even signatures from your form)
  • Specify custom email headers*
  • Specify the email character set*

* You can dynamically set these values with WS Form variables too. So you could even set one of these as the email address someone entered onto your form.

Tip: To ensure WS Form is fully compatible with WordPress, we use the standard wp_mail function to send emails. We recommend using an email gateway such as Amazon SES, MailGun, or SendGrid to send emails and using a WordPress plugin to add support for these gateways. You will then find that email sending is a lot more efficient than relying on raw emails being sent from your hosting provider.

Adding This Action

To add a ‘Send an Email’ action:

  1. When editing your form, click the ‘Actions’ icon at the top of the page. The ‘Actions’ sidebar will open on the right-hand side of the page.
  2. Click the ‘Add’  icon to add a new action.
  3. Select ‘Send an Email’ from the Action pulldown. A series of settings will appear.

As with all sidebars in WS Form, click the ‘Save’ button at the bottom to save your changes, or click ‘Cancel’ to disregard your changes.

The ‘Send and Email’ action settings are as follows:

When should this action run?

You can choose to send an email when the form is saved, submitted, or both.

Content Type

Choose ‘Plain text’ or ‘HTML’ for your email type. We recommend using HTML, which will enable you to better format your email and include images if you wish.

From Email Address

Enter the ‘From’ email address in this field. You can either enter an email address directly or use a WS Form variable in this field. For more information about WS Form variables, click here.

This field defaults to #blog_admin_email which will enter the email address you have configured in the WordPress Settings > General page.

From Display Name (optional)

You can enter a display name for your email for the from field. This will show the display name instead of the email address in most email clients.

You can either enter a name or use a WS Form variable in this field. For more information about WS Form variables, click here.

This field defaults to #blog_name which will enter the name of the website you have configured in the WordPress Settings > General page.

To

You can add any number of ‘To’ email addresses for the email. Typically this will be to you or perhaps to the website visitor to acknowledge their inquiry. To add a ‘To’ email address:

  1. Click the ‘Add’  icon.
  2. Enter the email address.
  3. Optionally enter a display name for the email address (e.g. Your name).

You can enter straight text or use a WS Form variable in this field. For more information about WS Form variables, click here.

This field defaults to #blog_admin_email and#blog_name which will enter the email address and the name of your website you have configured in the WordPress Settings > General page.

Tip: Some email clients do not like emails that are sent to and from the same email address. We would recommend changing the from email address to something like do.not.reply@yourdomain.com to ensure these are different. Also some email gateways require you to register sender email addresses before you can use them. Ensure you have registered all from addresses if that is the case.

CC

The ‘CC’ field lets you send a carbon copy of the email to recipients. Use the same method as adding values to the ‘To’ field (see above) to complete this section. This field is optional.

BCC

The ‘BCC’ field lets you send a blind carbon copy of the email to recipients. Use the same method as adding values to the ‘To’ field (see above) to complete this section. This field is optional. BCC recipients will receive a copy of the email, but other recipients will not see that they received it.

Reply To Email Address

By default replies to an email are sent to the ‘From’ email address’. You can override this by entering an email address into this field.

You can enter straight text or use a WS Form variable in this field. For more information about WS Form variables, click here.

Subject

Enter the subject line of your email here.

You can enter straight text or use a WS Form variable in this field. For more information about WS Form variables, click here.

This field defaults to #form_label which enters the label of your form as the subject line.

Message Editor

If you chose ‘HTML’ as your content type, you can choose to edit your email using the WordPress visual editor or enter raw HTML using the ‘HTML’ editor.

If you chose ‘Plain text’ as your content type, you will enter your email using a regular text box.

You can enter straight text and also use WS Form variables in this field. For more information about WS Form variables, click here. There are various email-specific variables that can be used in this field.

This field defaults to:

#email_subject
#email_submission

This will add the subject of the email and the contents of the form submission to the email.

Some frequently used variables are as follows:

Name / VariableDescription

To view all available variables, click here.

Attachments

If you have file upload or signature fields in your form, you can attach them using this setting. To add an attachment:

  1. Click the ‘Add’  icon.
  2. Select the file upload or signature field.

Headers

You can use this setting to add custom headers to your email.

  1. Click the ‘Add’  icon.
  2. Add the header key value pair.

Character Set

Enter the character set of the email here if you wish to change it.

You can enter straight text or use a WS Form variable in this field. For more information about WS Form variables, click here.

This field defaults to #blog_charset which enters the character set of your website.