I have a contact form where people register his friend. The form sends the information to me and thank you email to user which register his friend , but I need send one more email to his friend with a different text . Is that possible with contact form 7 ?
Since CF7 still doesn't do this itself, I wrote a basic plugin for it (More Mails for CF7). The crux of it is using CF7's hooks and functions to do most of the work for you:
wpcf7_contact_form_propertieswpcf7_editor_panels filter hook.wpcf7_save_contact_form action hook.wpcf7_additional_mail filter hook.It's not hard, each step is quite small. The relevant code is here, but you don't have to use any of the parts that create a settings page if you're happy setting a static number of extra mail messages in your code.
Contact Form 7 has a wpcf7_mail_sent hook for this.
// ...in functions.php
add_action('wpcf7_mail_sent', function ($cf7) {
// Run code after the email has been sent
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With