Ejemplo n.º 1
0
    }
} else {
    $mail->from = $account->user;
    $mail->account_class = $account->_class;
    $mail->account_id = $account->_id;
    $mail->draft = '1';
    if ($reply_to_id) {
        $mail->in_reply_to_id = $reply_to_id;
        $reply_to = new CUserMail();
        $reply_to->load($reply_to_id);
        $mail->to = $reply_to->from;
        strpos($reply_to->subject, 'Re:') === false ? $mail->subject = "Re: {$reply_to->subject}" : ($mail->subject = $reply_to->subject);
        if ($answer_to_all) {
            $mail->cc = $reply_to->cc;
        }
    }
    $mail->store();
}
$mail->loadAttachments();
foreach ($mail->_attachments as $_attachment) {
    $_attachment->loadFiles();
}
// Initialisation de CKEditor
$templateManager = new CTemplateManager();
$templateManager->editor = "ckeditor";
$templateManager->messageMode = true;
$templateManager->initHTMLArea();
$smarty = new CSmartyDP();
$smarty->assign('mail', $mail);
$smarty->assign('account', $account);
$smarty->display('inc_edit_usermail.tpl');