WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Create emails to multiple conditional addresses (2 posts)

  1. andycahn
    Member
    Posted 3 years ago #

    How can I use CF7 to generate emails to multiple clients based on a few Y/N choices, without errors resulting from a blank email when someone selects N?

    For example, item-1 and item-2 relate to projects from different clients that should be copied on requests for their own item (but not if someone says no to their item).

    I have these drop down fields to ask Y/N then how many....

    [select email-1 "Y|person1@email.com" "N|"] [select item1 include_ blank "5" "10"] item-1

    [select email-2 "Y|person2@email.com" "N|"] [select item2 include_ blank "5" "10"] item-2

    ...In the "additional headers" box, I have...

    Cc: [email-1]
    Cc: [email-2]

    If both are selected, the email goes through fine. If only one is selected, This error message shows up, even though the emails actually go through...

    "Failed to send your message. Please try later or contact administrator by other way."

    How can I do these while leaving the N option blank to no email? Would I have to insert a email to an active dummy email address to prevent the errors?

  2. flamenco
    Member
    Posted 3 years ago #

    That is a brain-teaser - I would expect an error if you were using the asterisk for "required", so I don't see anything obvious.

    I wonder if using a literal blank for your N selections instead of "nothing". You know, like:

    [select email-1 "Y|person1@email.com" "N| "]

    I just tested with that, and it worked OK, although I didn't use 2 selects. Or maybe just take the pipe off of the N selection.

    I love this app!
    Dave

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic