コード例 #1
0
ファイル: send.php プロジェクト: BackupTheBerlios/hpt-obm-svn
 $mime = $mail->GetMime();
 if (isset($_SESSION['attach_array'])) {
     while ($attachment = array_shift($_SESSION['attach_array'])) {
         @unlink($attachment->tmp_file);
     }
 }
 // We need to unregister the attachments array and num_attach
 unset($_SESSION['num_attach']);
 unset($_SESSION['attach_array']);
 if ($profile["type"] == "imap") {
     $sent_folder = $profile['sent'];
     if ($sent_folder != '') {
         require $GO_CONFIG->class_path . "imap.class.inc";
         $imap_stream = new imap();
         if ($imap_stream->open($profile["host"], "imap", $profile["port"], $profile["username"], $GO_CRYPTO->decrypt($profile["password"]), $sent_folder)) {
             if ($imap_stream->append_message($sent_folder, $mime, "\\Seen")) {
                 if (isset($_REQUEST['action']) && ($_REQUEST['action'] == "reply" || $_REQUEST['action'] == "reply_all")) {
                     $uid = array($_REQUEST['uid']);
                     $imap_stream->set_message_flag($_POST['mailbox'], $uid, "\\Answered");
                 }
                 $imap_stream->close();
                 require $GO_THEME->theme_path . "header.inc";
                 echo "<script type=\"text/javascript\">\r\nwindow.close();\r\n</script>\r\n";
                 require $GO_THEME->theme_path . "footer.inc";
                 exit;
             }
         }
         require $GO_THEME->theme_path . "header.inc";
         echo "<script type=\"text/javascript\">\r\nalert('" . $ml_sent_items_fail . "');\r\nwindow.close();\r\n</script>\r\n";
         require $GO_THEME->theme_path . 'footer.inc';
         exit;