How can I send to multiple Contact Form 7 recipients based on form input? [closed]

No need to write any code, Contact form 7 has features of Additional Headers in the Mail section. In that you just need to write the email’s header inside the Additional headers textbox in Mail(Second Tab) section. Put this inside the Additional Headers textbox. Cc: [friend1-email], [friend2-email], [friend3-email], [friend4-email], [friend5-email] OR You can alter the … Read more

How to execute a server side script when contact form 7 is submitted? [closed]

You need wpcf7_before_send_mail hook that gets triggered after sending email successfully. Just add this in your functions.php. add_action( ‘wpcf7_before_send_mail’, ‘process_contact_form_data’ ); function process_contact_form_data( $contact_data ){ var_dump($contact_data->posted_data); $name = $contact_data->posted_data[“your-name”]; $email = $contact_data->posted_data[“your-email”]; echo $name ; echo $email; } You can access fields by their name in $contact_data->posted_data array. Yes. You can redirect to another page … Read more