Пример #1
0
                ini_set($ini_default_charset, "UTF-8");
            }
            mb_language("uni");
        }
        $mailer = new Mailer();
        // Set the vars on the object
        $mailer->subject = $_REQUEST['subject'];
        $mailer->message = $_REQUEST['message'];
        if ($_REQUEST['from'] == 'system') {
            $mailer->set_default_sender();
        } else {
            $mailer->sender = $GLOBALS['user']->email;
            $mailer->sender_name = $GLOBALS['user']->fullname;
        }
        if ($mailer->send_to_group($_REQUEST['to'])) {
            $title = T_('E-mail Sent');
            $body = T_('Your E-mail was successfully sent.');
        } else {
            $title = T_('E-mail Not Sent');
            $body = T_('Your E-mail was not sent.');
        }
        $url = AmpConfig::get('web_path') . '/admin/mail.php';
        show_confirmation($title, $body, $url);
        break;
    default:
        require_once AmpConfig::get('prefix') . UI::find_template('show_mail_users.inc.php');
        break;
}
// end switch
UI::show_footer();