Contact Form 7: Send Emails To Different ID Based On Dropdown Selection

To submit all queries to the relevant department name. Let’s say you have “Recipient 1”, “Recipient 2”, “Recipient 3” and “Recipient 4 department.

  1. Install and activate the “Conditional Fields” plugin in your WordPress installation.
  2. Create a dropdown field in your Contact Form 7 form using the following shortcode: [select your-recipient “Recipient 1” “Recipient 2” “Recipient 3” “Recipient 4”]
  [select your-recipient "Recipient 1|test1@example.com" "Recipient 2|test2@example.com " "Recipient 3|test3@example.com" "Recipient 4|test4@example.com"]

3. Go to the “Mail” tab and set the mail tag “[your-recipient]” into the To: field. This setting ensures that the email is sent to the specified email address that the sender selected. Don’t take a tension about invalid mailbox syntax.

Replace “Recipient 1,” “Recipient 2,” and “Recipient 3” with the actual names or email addresses of the recipients.

4. Save the changes to your Contact Form 7 form and publish it.

Now, when a user submits the form, the selected recipient option will be evaluated, and the email will be sent to the corresponding email address.