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 "Salesfirstname.lastname@example.org" "Serviceemail@example.com" "General Questionsfirstname.lastname@example.org"]</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
for the email address.
Here is a working form: