email multiple users with contact 1.6 (or liaise 1.26)

Posted by carrot on 1286148541
I currently have Contact with captcha 1.6 and Liaise 1.26 installed on ICMS 1.2.2. I have chosen Contact with Captcha 1.6 because it allows me to select via a dropdown who the email is sent to rather than just admin. I would rather use Liaise 1.26 but have yet to figure out how to get an email sent to someone other than the webmaster or ALL registered users. So in the mean time I am using Contact with Captcha.  My only issue is that I would like my users to be able to select multiple users from the select few I add in the back end. I think I have narrowed out the code, but don't know what to change it to.
// show a drop down with the correct departments listed $departmentlist = new XoopsFormSelect( $contactclass->getDepartmentTitle(), "userDepartment" ); $departments = $contactclass->getDepartments(); // get array of departments $selDept = $contactclass->getSelectedDepartment(); $cnt = 0; foreach( $departments as $val ) { $valexplode = explode( ',', $val ); $selected = false; if ( $selDept != "" && ( strcmp( $selDept, $valexplode[0] ) == 0 ) ) { // this option is selected $selected = true; } else if ( $selDept == "" && $cnt == 0 ) // if there is none selected and this is the first one { // make it selected $selected = true; } $departmentlist->addOption($valexplode[0]); if ( $selected == true ) { $departmentlist->setValue($valexplode[0]); } $cnt++; } $contact_form->addElement( $departmentlist ); }

This Post was from: https://www.impresscms.org/iforum/viewtopic.php?topic_id=4484&post_id=40099