• Apologies if this has been answered before, but I cannot find the answer to this particular problem.

    We are using the following syntax to try to send an email to two separate recipients (partial code snip).

    elseif($posted_data["Target"] == 'Yoga' )  { $recipient_email = '[email protected],[email protected]';}
    

    else { // If no dropdown option is selected
    $recipient_email = ‘[email protected]’;
    }

    // set the email address to recipient
    $mailProp = $contact_form->get_properties(‘mail’);
    $mailProp[‘mail’][‘recipient’] = $recipient_email;

    // update the form properties
    $contact_form->set_properties(array(‘mail’ => $mailProp[‘mail’]));
    }

    No matter what we try we either get an error or the email only goes to the first email listed on the line. I should emphasise this works perfectly when only one email address per line.

    Can somebody please tell me what we are doing wrong?

    Thanks

    Ian

Viewing 1 replies (of 1 total)
  • Thread Starter cihomewood

    (@cihomewood)

    Hi

    I would really like help with this. Has anybody managed to send contact form submissions to two separate email addresses?

    Thanks

    Ian

Viewing 1 replies (of 1 total)
  • The topic ‘wpcf7_before_send_mail with multiple recipients’ is closed to new replies.