Ejemplo n.º 1
0
function verifyAndSendMail()
{
    global $conf;
    $subject = "[MailZu] " . stripslashes(CmnFns::getGlobalVar('subject', POST));
    $body = stripslashes(CmnFns::getGlobalVar('body', POST));
    if ($subject != '' && $body != '') {
        $adminEmail = $conf['app']['adminEmail'];
        $sub = "[ Email Administrator ] Notification from '" . $_SESSION['sessionID'] . "'";
        $mailer = new PHPMailer();
        if (is_array($adminEmail)) {
            foreach ($adminEmail as $email) {
                $mailer->AddAddress($email, '');
            }
        } else {
            $mailer->AddAddress($adminEmail, '');
        }
        $mailer->FromName = $_SESSION['sessionID'];
        $mailer->From = $_SESSION['sessionMail'][0];
        $mailer->Subject = $subject;
        $mailer->Body = $body;
        $mailer->Send();
        CmnFns::redirect_js('summary.php');
    } else {
        CmnFns::do_error_box(translate('You have to type some text'), '', false);
        printsendmail();
    }
}
Ejemplo n.º 2
0
/**
* Include control panel-specific output functions
*/
include_once 'templates/common.template.php';
/**
* Include sendmail to admin specific output functions
*/
include_once 'templates/sendmail.template.php';
if (!Auth::is_logged_in()) {
    Auth::print_login_msg();
    // Check if user is logged in
}
$_SESSION['sessionNav'] = "Email Administrator";
$t = new Template(translate('Email Administrator'));
$t->printHTMLHeader();
$t->printWelcome();
$t->startMain();
// Break table into 2 columns, put quick links on left side and all other tables on the right
startQuickLinksCol();
showQuickLinks();
// Print out My Quick Links
startDataDisplayCol();
$action = CmnFns::getGlobalVar('action', POST);
if (isset($action)) {
    verifyAndSendMail();
} else {
    printsendmail();
}
endDataDisplayCol();
$t->endMain();
$t->printHTMLFooter();