Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Create emails to multiple conditional addresses

  • 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|” “N|”] [select item1 include_ blank “5” “10”] item-1

    [select email-2 “Y|” “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?

Viewing 1 replies (of 1 total)
  • 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|" "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!

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] Create emails to multiple conditional addresses’ is closed to new replies.