Beispiel #1
0
} else {
    // Send the email-message via SMTP
    $sendmsg->deliver();
    // Display a different notification in the email display to the browser ( depending if Sent or Drafts folder )
    if (!$sendmsg->attachname[0]) {
        $var['msg'] = $atmail->parse("html/{$atmail->Language}/msg/sentmsg.html");
    } else {
        $var['msg'] = $atmail->parse("html/{$atmail->Language}/msg/sentmsga.html");
    }
}
$args = array();
$atmail->pluginHandler->triggerEvent('onEmailSent', $args);
// Print the message sent
$var['emailmessage'] = $_REQUEST['emailmessage'];
// cleanup xss issues
$var['emailmessage'] = $atmail->escape_jscript($var['emailmessage']);
if (strpos($var['contype'], 'html') === false) {
    $var['emailmessage'] = nl2br($var['emailmessage']);
}
// Delete the attach files (if any)
$sendmsg->delete_attachments();
// When printing the message, change the <> chars , so not to confuse the browser
// Also strip the @ for Groups
foreach (array('EmailTo', 'EmailCC', 'EmailBCC') as $v) {
    $key = strtolower($v);
    $var[$key] = str_replace(array('<', '>'), array('&lt;', '&gt;'), $sendmsg->{$v});
    $var[$key] = preg_replace('/@((Shared)?Group)(?=[^a-zA-Z0-9\\-.]*)/', '$1', $var[$key]);
    $var[$key] = $mail->quote_header($var[$key]);
}
// Receive a list of recipients from the user
$var['AddRecipients'] = $sendmsg->AddRecipients;