Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Njones35 / Last Updated October 17, 2022

How to Send Emails to Dynamic Recipients from a WordPress Contact Form

how to send emails to dynamic recipients in WordPress

Need a contact form that sends emails to dynamic recipients?
Do you need to route messages to different departments? Wish you could conditionally set dynamic recipients based on choices in your form? Formidable Forms does all this and more!

Every contact form plugin that I've ever used sends emails. Nearly all allow you to define CC or BCC recipients as well as your TO address. Formidable Forms does more! Built-in features allow you to dynamically control where messages are routed depending on each individual form entry.

Subscribe on YouTube

This control of dynamic recipients makes Formidable Forms special

Today I'll examine three main aspects of this feature, and their real world applications.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!
  1. Send different messages to each recipient using conditional logic.
  2. Route the same email to a list of dynamic recipients, using the Separate values approach.
  3. Send the same email to all recipients using email addresses that were entered in another form with the Dynamic field approach.

Send a different message to each recipient with Conditional Logic

Suppose you have three departments in your company, and a form on your website for people to leave an inquiry. You want to send each department a notification about the inquiry only if it is applicable to them.

Additionally, each message can be individually customized, so each department only receives the details applicable to them, and some information can be excluded for privacy reasons if required.

  1. In your form, add a field for users to choose the Department they wish to contact. For this example, I'm going to add the options Human resources, Billing and Housekeeping in a Dropdown.
  2. Next, in your form go to Settings → Form Actions. Then click the Email Notification icon to add new notifications - one for each department.
    Email Notification conditional logic
  3. Enter the recipient email address in the To box. Then enter your message in the Message box. Repeat this for each department, customizing each message if you wish.
  4. In each of your email actions, click "Use Conditional Logic". Define the conditional logic so that each email action is only triggered when the matching selection is made by a user in the form. In this example, the email is triggered only when the 'Department' selection is equal to 'Human Resources'. Repeat this for each of your email actions.
    Email Routing dynamic recipients conditional logic
  5. Now, each department will get an email notification only when the submitted inquiry is relevant to their department. Also, when configured, the email content can be unique for each department.

Use Separate Values to route email messages

To send the same email to everyone, but have the recipients change based on a field in your form, you should use Separate Values.

Let's take the same scenario with a company that has three departments. You want to send human resources an email only if it is applicable to them; the same is true for your billing and housekeeping departments. Since the email message will be identical no matter the chosen department, this is simpler to setup. You only need to set up one email action with dynamic recipients.

  1. Email Routing SepterateAs described in the first example, add a dropdown or radio field to your form. Check the option to "Use separate values" in the field options.
  2. Add the department for the displayed value and the email address for the saved value. When your users fill out the form, they will select the department related to their inquiry.
    Email Routing Saved Value
  3. In your Form actions, add a new notification and click on the To box. Then click on your dropdown or radio button field in the 'Customization' sidebar to add this field to the To box. Next, add show="value" to the field ID in your To box. Now, selecting "Human Resources" in the department dropdown routes the email only to [email protected]
    Email Routing To Saved Value

Use Dynamic Fields to set email recipients

Use this method to send the same email notification to all recipients, and have the recipient change based on a field in your form.

A big advantage of this method is that email addresses are hidden. Even when inspecting the code on the page, there is no way to see them. Email addresses dynamically populate using entries from another form.

Again we'll base this example on the same company with three departments. For this method, we require two forms - the Contact Form as usual, and also a Data Form which will hold the list of departments and corresponding email addresses.

Email Routing Dynamic Field

    1. Create a new form titled "Departments" - this is the Data Form. Add two fields: A Single Line Text field for the Department Name, and an Email Address field.
    2. Add an entry for each option you want your users to select from. For example, 'Human Resources' in the text field and '[email protected]' in the email fieldEmail Routing Custom
    3. Next, go to your inquiry form and add a 'Dynamic Field'. In the "Import Options From" box select "Entries from a form field", choose your Data Form, and select your "Department Name" field. You can choose to display as Dropdown, Radio buttons, or Checkboxes.
    4. In your Form Actions, add a new email notification. Select the To box, then click on the "Department Emails" field in the Customization sidebar to add this field to the list of email recipients. Now selecting human resources as the department routes the email notification to the HR inbox.

Read more: Why you should replace HTML email links with email contact forms

So what are you waiting for? Streamline your workflow today with custom e-mail routing!

 Get Formidable Forms Now!

Did you know that Formidable Forms also has amazing Conditional Redirect features? Combine the two and make your contact forms work harder!

Read more about WordPress email

  • Email Personalization Examples 3 Email Personalization Examples to Maximize User Engagement
    Read More
    WordPress Mailgun subscribe form How to Create a MailGun Subscribe Form in WordPress
    Read More
    How to Create an Email Signup Form in WordPress How to Create an Email Signup Form (Beginners' Guide)
    Read More
  • How to Create Holiday Out of Office Messages for WordPress Forms How to Create Holiday Out of Office Messages for WordPress Forms
    Read More
    the top 7 email marketing plugins for WordPress 10 Best WordPress Email Marketing Plugins [Free & Paid!]
    Read More
    How to use WP Mail SMTP plugin in WordPress How to Use the WP Mail SMTP Plugin in WordPress
    Read More
  • How to Reduce Email Unsubscribe Rates How to Reduce Email Unsubscribe Rates: 8 Tips
    Read More
    WordPress Not Sending Emails WordPress Not Sending Emails? Here’s How to Fix it
    Read More
    How to verify email addresses in WordPress How to Verify Email Addresses in WordPress
    Read More
  • How to Send Confirmation Emails in WordPress How to Send Confirmation Emails in WordPress
    Read More
    7 Content Upgrade Examples that will Boost Email Signups 7 Content Upgrade Examples that will Boost Email Signups
    Read More
    How to Create a Winning Email Strategy for Your WordPress Blog How to Create a Winning Email Strategy for Your WordPress Blog
    Read More
  • how to create an email list How to Create an Email List for Your WordPress Blog
    Read More
    Reasons to use contact forms not mailto links Why You Should Replace HTML Email Links with Email Contact Forms
    Read More
    6 Ways to Increase Conversions in Your Email Sign Up Form
    Read More

Try Formidable Forms risk-free with our 14-day money-back guarantee!

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Comments

  1. Ericson N Moredo says

    May 11, 2021 at 4:39 pm

    Hi i want to know how to use.unique with increments on a form.

    Also, if the unique field equals to certain numbers, ex. 01, 02, 03.... The email should be routed to agent 01, agent02, agent03...so on.

    Let say the unique field is order number.

    Thanks

    Reply
    • Nathanael Jones says

      May 12, 2021 at 12:46 am

      Hi Ericson,
      Can you please open a ticket in our helpdesk with this question: https://formidableforms.com/new-topic/

      Thank you!

      Reply
  2. milkboy31 says

    April 6, 2022 at 10:01 am

    We use conditional routing all the time on our emails. It's great for customizing who gets what and even what content goes to each person for followup. We haven't dug too deeply into dynamic routing by pulling in contents from another form, but I can see the utility in doing so. For us we just use generic "department based" email addresses so when roles change the email is assigned to the new employee and forms go to the right place still.

    Reply
  3. [email protected] says

    April 20, 2022 at 5:03 pm

    This is a great way of making a contract with a hidden field (checkbox) and after reviewing it on the back end check the box and then it will send out the email to the person for signing.

    Reply
  4. jpruitt says

    April 27, 2022 at 10:38 am

    I use dynamic features a ton and Formidable's support has always helped with any issues that I've had.

    Reply
  5. trishacupra says

    April 27, 2022 at 5:39 pm

    I love how the possibilities are always endless with Formidable Pro.

    Reply
  6. Vartis says

    May 8, 2022 at 5:12 pm

    I am looking for an option to allow each user to add a contact form to their profile page, for example, the default WP author template. When the form is sent, it goes to this user email used for registartion. Would it be possible?

    Reply
    • srwells says

      May 9, 2022 at 11:46 am

      Hi there, yes this would be possible. you would want to create a field that could contain the email of the "Author" then simply set that field as the "To" address for your email settings.

      Reply
      • Vartis says

        May 9, 2022 at 2:32 pm

        Oh this is great! Thank you for your reply.

        Sorry, forgot to add it in the original question, would same functionality be possible with mail subscription when integrated with Mailchimp?

        Possible scenario: i create a subscription form and add it as an option to user profile page as a front end form. The user can turn on/off the box using checkbox. If it's turned on, any visitor can subscribe to a mailing list of this user and not my mailing list as site admin.

        Hope it make sence, thank you.

        Reply
        • srwells says

          May 10, 2022 at 2:49 pm

          Without all the information of your setup, it is hard to definitively say yes or no. Could you please contact our support team from our support page so we can get the additional information we need to determine if this is supported?

          Reply
          • Vartis says

            May 10, 2022 at 2:54 pm

            I have not purchased the plugin yet, just needed to gather as more info as possible before buying, but i think i'll purchase the pro version anyway. Really appriciate your help, thank you!

            Reply
            • srwells says

              May 10, 2022 at 2:56 pm

              Understood...One of the options on our help desk is "Pre-sales question" you can still open a new ticket even though you haven't purchased.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get Email Updates

Popular Resources

    • How to Create a Searchable Database on a WordPress Site
    • Create a WordPress Custom Calculator: Easy, Powerful Results
    • How to Create a Fitness Tracker in WordPress
    • Formidable Views: The Best WordPress Custom Application Plugin
    • How To Require Email To Download Files in WordPress
    • How to Create Conditional Drop Down Lists in WordPress Forms
    • Best Gravity Forms Alternative for WordPress: Formidable Forms vs. Gravity Forms
    • How to Make a Quiz in WordPress
    • WPForms Alternative: Formidable Forms vs. WPForms Compared

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews