wpcf7_before_send_mail with multiple recipients
-
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
- The topic ‘wpcf7_before_send_mail with multiple recipients’ is closed to new replies.