WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Condition to send mail to alternate recipient if value is set (4 posts)

  1. Audentio
    Member
    Posted 7 months ago #

    Hi all!

    Want to know if I can have a condition inside my CF7 form that will allow me to send an email to an alternate recipient if a certain value is set. In raw PHP, I would just have to do something like:

    if ($_POST['field'] == 'bar') {
         $to .= ', newemail@email.com';
    }

    And that would edit the $to variable to include the new additional recipient.

    Please let me know if this is possible! :)

    Thanks,
    Mike

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

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 7 months ago #

  3. Audentio
    Member
    Posted 7 months ago #

    Thank you kindly for the response, but now the loading icon just keeps spinning, doesn't do anything.

    <p>Property Address :
    [select* address "401 W. State|aud**@gmail.com" "1111 S. Alpine" "308 W. State|aud**@gmail.com" "4615 E. State" "6595 E. State" "1818 Logan Ave." "1800 Logan Ave."]</p>

    As you can see, I've added the bar character for those two options. If they select one of those options, I want it to send to that email.

    [No bumping, thank you.]

  4. Audentio
    Member
    Posted 7 months ago #

    Hi there, could you take another look when you get the time?

Reply

You must log in to post.

About this Plugin

About this Topic