I think I’ve figured this one out.
For anyone interested here’s what I did:
First up, use &sendirect=`1` instead of &mailselector. You’ll see why in a tick.
Next build a multiselect with the name of ’email’ and the value of each email address you want to use. This is what will get used by &sendirect.
Create a wee php snippet (call it whatever) which uses the implode function to break up the mutilselect array. By no stretch of the imagination have I any real clue about php. The following works (for me) but please feel free to improve/enhance:
<?php
function fix_address( &$fields ){
$email_address = implode(",", $fields[email]);
$fields['email']= $email_address;
return true;
}
return '';
?>
Then call the snippet with the &eFormOnBeforeMailSent event like so:
[!fix_address!]
[!eForm? &formid=`contact_form` &sendirect=`1` &eFormOnBeforeMailSent=`fix_address` &tpl=`contact_form_tpl` &report=`contact_form_report` &thankyou=`contact_form_thanks` &subject=`Subject`!]
Apologies if this has been done/covered somewhere before, but I certainly couldn’t find any reference to it.
Enjoy!