/**
 * Get the users based on groups from the User Access Manager plugin
 * $meta_filter can be '', MAILUSERS_ACCEPT_NOTIFICATION_USER_META, or MAILUSERS_ACCEPT_MASS_EMAIL_USER_META
 */
function mailusers_get_itthinx_groups($exclude_id = '', $meta_filter = '')
{
    global $wpdb;
    $itthinx_groups = array();
    $groups = Groups_Utility::get_group_tree();
    $groups = Mailusers_Groups_Utility::flatten_group_tree($groups);
    foreach ($groups as $key => $value) {
        $group = Groups_Group::read($value);
        $ids = mailusers_get_recipients_from_itthinx_groups_group($group->group_id, $exclude_id, $meta_filter);
        if (!empty($ids)) {
            $itthinx_groups[$group->group_id] = $group->name;
        }
    }
    return $itthinx_groups;
}
                break;
        }
    }
    //  Extract the recipinents from the various target sources
    $recipients = array();
    if (!empty($send_filters)) {
        $recipients = array_merge($recipients, mailusers_get_recipients_from_custom_meta_filters($send_filters, $exclude_id, MAILUSERS_ACCEPT_MASS_EMAIL_USER_META));
    }
    if (class_exists(MAILUSERS_USER_GROUPS_CLASS) && !empty($send_ug)) {
        $recipients = array_merge($recipients, mailusers_get_recipients_from_user_groups($send_ug, $exclude_id, MAILUSERS_ACCEPT_MASS_EMAIL_USER_META));
    }
    if (class_exists(MAILUSERS_USER_ACCESS_MANAGER_CLASS) && !empty($send_uam)) {
        $recipients = array_merge($recipients, mailusers_get_recipients_from_uam_group($send_uam, $exclude_id, MAILUSERS_ACCEPT_MASS_EMAIL_USER_META));
    }
    if (class_exists(MAILUSERS_ITTHINX_GROUPS_CLASS) && !empty($send_groups)) {
        $recipients = array_merge($recipients, mailusers_get_recipients_from_itthinx_groups_group($send_groups, $exclude_id, MAILUSERS_ACCEPT_MASS_EMAIL_USER_META));
    }
    if (class_exists(MAILUSERS_PMPRO_CLASS) && !empty($send_pmpro)) {
        $recipients = array_merge($recipients, mailusers_get_recipients_from_membership_levels($send_pmpro, $exclude_id, MAILUSERS_ACCEPT_MASS_EMAIL_USER_META));
    }
    if (!empty($send_roles)) {
        $recipients = array_merge($recipients, mailusers_get_recipients_from_roles($send_roles, $exclude_id, MAILUSERS_ACCEPT_MASS_EMAIL_USER_META));
    }
    if (empty($recipients)) {
        ?>
			<p><strong><?php 
        _e('No recipients were found.', MAILUSERS_I18N_DOMAIN);
        ?>
</strong></p>
	<?php 
    } else {