Пример #1
0
function delete_move_next_delete()
{
    global $imapConnection, $delete_id, $mailbox, $auto_expunge;
    sqimap_messages_delete($imapConnection, $delete_id, $delete_id, $mailbox);
    if ($auto_expunge) {
        sqimap_mailbox_expunge($imapConnection, $mailbox, true);
    }
}
Пример #2
0
function delete_move_next_delete()
{
    global $imapConnection, $auto_expunge;
    sqgetGlobalVar('delete_id', $delete_id, SQ_GET);
    sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
    sqimap_messages_delete($imapConnection, $delete_id, $delete_id, $mailbox);
    if ($auto_expunge) {
        delete_move_expunge_from_all($delete_id);
        // sqimap_mailbox_expunge($imapConnection, $mailbox, true);
    }
}
Пример #3
0
function spamcop_while_sending()
{
    global $mailbox, $spamcop_delete, $auto_expunge, $username, $key, $imapServerAddress, $imapPort;
    // load sqgetGlobalVar()
    include_once SM_PATH . 'functions/global.php';
    // check if compose.php is called by spamcop plugin
    if (sqgetGlobalVar('spamcop_is_composing', $spamcop_is_composing)) {
        if ($spamcop_delete) {
            $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
            sqimap_mailbox_select($imapConnection, $mailbox);
            sqimap_messages_delete($imapConnection, $spamcop_is_composing, $spamcop_is_composing, $mailbox);
            if ($auto_expunge) {
                sqimap_mailbox_expunge($imapConnection, $mailbox, true);
            }
        }
        // change default email composition setting. Plugin always operates in right frame.
        // make sure that compose.php redirects to right page. Temporally override.
        global $compose_new_win;
        $compose_new_win = false;
    }
}
Пример #4
0
}
if (isset($_GET['where'])) {
    $where = urlencode($_GET['where']);
}
if (isset($_GET['what'])) {
    $what = urlencode($_GET['what']);
}
if (isset($_GET['sort'])) {
    $sort = (int) $_GET['sort'];
}
if (isset($_GET['startMessage'])) {
    $startMessage = (int) $_GET['startMessage'];
}
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
sqimap_messages_delete($imapConnection, $message, $message, $mailbox);
if ($auto_expunge) {
    sqimap_mailbox_expunge($imapConnection, $mailbox, true);
}
sqimap_logout($imapConnection);
if (!isset($saved_draft)) {
    $saved_draft = '';
}
if (!isset($mail_sent)) {
    $mail_sent = '';
}
$location = get_location();
if (isset($where) && isset($what)) {
    header("Location: {$location}/search.php?where=" . $where . '&what=' . $what . '&mailbox=' . urlencode($mailbox));
} else {
    if (!empty($saved_draft) || !empty($mail_sent)) {
}
if (sqGetGlobalVar('where', $tmp, SQ_FORM)) {
    $where = urlencode($tmp);
}
if (sqGetGlobalVar('what', $tmp, SQ_FORM)) {
    $what = urlencode($tmp);
}
if (sqGetGlobalVar('sort', $tmp, SQ_FORM)) {
    $sort = (int) $tmp;
}
if (sqGetGlobalVar('startMessage', $tmp, SQ_FORM)) {
    $startMessage = (int) $tmp;
}
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
sqimap_messages_delete($imapConnection, $message, $message, $mailbox, $bypass_trash);
if ($auto_expunge) {
    sqimap_mailbox_expunge($imapConnection, $mailbox, true);
}
if (!isset($saved_draft)) {
    $saved_draft = '';
}
if (!isset($mail_sent)) {
    $mail_sent = '';
}
$location = get_location();
if (isset($where) && isset($what)) {
    header("Location: {$location}/search.php?where=" . $where . '&what=' . $what . '&mailbox=' . urlencode($mailbox));
} else {
    if (!empty($saved_draft) || !empty($mail_sent)) {
        header("Location: {$location}/compose.php?mail_sent={$mail_sent}&saved_draft={$saved_draft}");