Send a copy to yourself with Contact Form 7 in WordPress

13,492

Solution 1

I am not using Contact Form 7 anymore but as far as I remember on the settings page of your form, there are two areas called Mail. The first one is for receipment and you can enable the other one by checking the checkbox Mail(2). That one is for copies.

http://s.wordpress.org/extend/plugins/contact-form-7/screenshot-1.png?r=561651


By the way, I recommend using: http://www.gravityforms.com/

Very easy to use and lots of options to play with.

Solution 2

In the solutions above you can have two recipients, but you asked about a mail copy, so a carbon copy perhaps. The best practice is to use the "additional headers" functionality of the "contact form 7" wp plugin.

enter image description here

Good luck! :)

P.S.: But with checkbox it is more complicated, you need to use JS validation in "Form" box.

Solution 3

In the mailing address input field you can just add additional email addresses separated by a comma.

+1 for Gravity Forms too. It's developer licence is well worth the money a brilliant plugin.

Solution 4

add this code to your theme's functions.php

 add_filter( 'wpcf7_additional_mail', 'my_wpcf7_use_mail_2_or_not', 10, 2 );

function my_wpcf7_use_mail_2_or_not( $additional_mail, $cf ) {
    if ( 'yes' != $cf->posted_data['sendcopy'] )
        $additional_mail = array();

    return $additional_mail;
}

and alter the select tag to this:

[select sendcopy "no" "yes"]

Copy email form the one with mail tags that you receive and place it to the mail(2) field. and

ticke the Mail(2). then your Mail(2) will be active only when they select "yes".

Share:
13,492
George
Author by

George

Updated on June 17, 2022

Comments

  • George
    George almost 2 years

    I need to add a checkbox with text "Send a copy of this email to yourself" to Contact Form 7 in WordPress, so the sender can receive a copy of the message he sents.

    I can't find anything on google, so your help would be really appreciated. Thank you.

  • George
    George almost 12 years
    Thanks. I'll give it a try :)
  • Hynek Zatloukal
    Hynek Zatloukal almost 12 years
    For sure I have installed Concact Form 7 plugin and it is really there. Although Gravity Forms is a commercial plugin, it is worth a try, you won't be disappointed.