header("location: tiki-webmail.php?locSection=settings");
     die;
 }
 // Send a message
 if (isset($_REQUEST["reply"]) || isset($_REQUEST["replyall"])) {
     check_ticket('webmail');
     $webmaillib->set_mail_flag($current["accountId"], $user, $_REQUEST["realmsgid"], 'isReplied', 'y');
 }
 $smarty->assign('sent', 'n');
 $smarty->assign('attaching', 'n');
 if (isset($_REQUEST["send"])) {
     $mail = new TikiMail($user);
     $email = $userlib->get_user_email($user);
     $mail->setFrom($email);
     if (!empty($_REQUEST["cc"])) {
         $mail->setCc($_REQUEST["cc"]);
     }
     if (!empty($_REQUEST["bcc"])) {
         $mail->setBcc($_REQUEST["bcc"]);
     }
     $mail->setSubject($_REQUEST["subject"]);
     if ($_REQUEST["attach1"]) {
         check_ticket('webmail');
         $a1 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach1file"]);
         $mail->addAttachment($a1, $_REQUEST["attach1"], $_REQUEST["attach1type"]);
         @unlink('temp/mail_attachs/' . $_REQUEST["attach1file"]);
     }
     if ($_REQUEST["attach2"]) {
         check_ticket('webmail');
         $a2 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach2file"]);
         $mail->addAttachment($a2, $_REQUEST["attach2"], $_REQUEST["attach2type"]);
Example #2
0
 if (!$current) {
     handleWebmailRedirect('locSection=settings');
 }
 $headerlib->add_js('if (webmailTimeoutId) {window.clearTimeout(webmailTimeoutId);}', 0);
 // Send a message
 if (isset($_REQUEST['reply']) || isset($_REQUEST['replyall'])) {
     check_ticket('webmail');
     $webmaillib->set_mail_flag($current['accountId'], $user, $_REQUEST['realmsgid'], 'isReplied', 'y');
 }
 $smarty->assign('sent', 'n');
 $smarty->assign('attaching', 'n');
 if (isset($_REQUEST['send'])) {
     $email = empty($current['fromEmail']) ? $userlib->get_user_email($user) : $current['fromEmail'];
     $mail = new TikiMail($user, $email);
     if (!empty($_REQUEST['cc'])) {
         $mail->setCc($_REQUEST['cc']);
     }
     if (!empty($_REQUEST['bcc'])) {
         $mail->setBcc($_REQUEST['bcc']);
     }
     $mail->setSubject($_REQUEST['subject']);
     if ($_REQUEST['attach1']) {
         check_ticket('webmail');
         $a1 = file_get_contents('temp/mail_attachs/' . $_REQUEST['attach1file']);
         $mail->addAttachment($a1, $_REQUEST['attach1'], $_REQUEST['attach1type']);
         @unlink('temp/mail_attachs/' . $_REQUEST['attach1file']);
     }
     if ($_REQUEST['attach2']) {
         check_ticket('webmail');
         $a2 = file_get_contents('temp/mail_attachs/' . $_REQUEST['attach2file']);
         $mail->addAttachment($a2, $_REQUEST['attach2'], $_REQUEST['attach2type']);