WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
email to multiple recipients? (7 posts)

  1. feinstee
    Member
    Posted 1 year ago #

    Is there a way to send an email to multiple recipients? I want the person filling out the form to add the emails - for example: list the addresses of 5 friends, and the form sends them all a message.

    Thanks.

    http://wordpress.org/extend/plugins/contact-form-7/

  2. ixthus27
    Member
    Posted 1 year ago #

    Looking for same solution. . .

  3. e
    Member
    Posted 1 year ago #

    Yes, type a comma after each one:
    John <john@gmail.com>,Mark <mark@gmail.com>

  4. e
    Member
    Posted 1 year ago #

    Sorry, the code above will not work for you.

    If you want the user to type in the emails and then resend emails you need to change the CF7 object's recipient like this:

    $WPCF7_ContactForm->mail['recipient'] = "friend1@gmail.com,friend2@gmail.com,friend3@gmail.com,friend4@gmail.com,friend5@gmail.com,";

    Here's a more detailed explanation on how to create your plugin and add your custom code (you'll need to know a bit of PHP): Creating a WordPress plugin

  5. EfremJ
    Member
    Posted 1 year ago #

    There's an easier way to do it from inside of a form without having to go into the PHP and change the CF7 object.

    In the Form section when you're creating a form, simply create 5 email elements as follows:

    [your-email1]
    [your-email2]
    [your-email3]
    [your-email4]
    [your-email5]

    Then in the To line, add them in as follows:

    [your-email1],[your-email2],[your-email3],[your-email4],[your-email5]

    When your form is rendered on your page, you'll have five email fields that the end-user must fill out. Whatever values the end-user types into those fields populates the To: line and those five people get copies of the form being submitted.

  6. jtrd39
    Member
    Posted 1 year ago #

    I can not figure out how to send the submittion to me and my business partner. I tried everything possible:

    first i tried this: John <john@gmail.com>,Mark <mark@gmail.com>
    and this: John <john@gmail.com>, Mark <mark@gmail.com>
    and this: john@gmail.com, mark@gmail.com

    I get the message sent to only the first email address (mark) like this:
    from: b test@gmail.com via gator201.hostgator.com
    to: john@gmail.com, mark@gmail.com

    Any ideas?

  7. buzztone
    Member
    Posted 1 year ago #

    @ jtrd39 - All of the formats you have used should work - they just need to be comma separated.

    See http://wordpress.org/support/topic/plugin-contact-form-7-multiple-recipient-email-addresses?replies=11 for some other possible issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic