Multiple Email Addresses With Contact Form 7 WordPress Plugin

A viewer asked about using different email addresses to send form responses to based on special criteria using the WordPress plugin called Contact Form 7. There are many forms plugins but for down and dirty, let me do some of the customization, don’t take over my website purposes; PF7 is my choice.

For our example we will use departments: Sales, Service, and General. We will use piped values in a drop-down to create the entry in the drop-down list and select the email to send it to. Then we will switch over to the Mail tab in our CF7 editor and send the email to the variable name – in this case “department”.

Here is the code for the form:

<label> Your Name (required)
    [text* your-name] </label>

<label> Your Email (required)
    [email* your-email] </label>

<label> Department (required)
    [select* department "Sales|sales@mailinator.com"
    "Service|service@mailinator.com"
    "General Questions|questions@mailinator.com"]</label>

<label> Subject
    [text your-subject] </label>

<label> Your Message
    [textarea your-message] </label>

[submit "Send"]

And in the “To” field in the “Mail” tab we simply use

[department]
 for the email address.

Here is a working form:

And you can check the results at Mailinator.com by checking either sales, service, or questions.