Fixed display error in From-lines of the form: "Doe, John" <john@doe.org>
[squirrelmail.git] / src / delete_message.php
CommitLineData
59177427 1<?php
895905c0 2
35586184 3/**
4 * delete_message.php
5 *
15e6162e 6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
35586184 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
65c3ec94 9 * Deletes a meesage from the IMAP server
35586184 10 *
11 * $Id$
12 */
ef870322 13
35586184 14require_once('../src/validate.php');
15require_once('../functions/display_messages.php');
16require_once('../functions/imap.php');
d3cdb279 17
65c3ec94 18$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
19
20sqimap_mailbox_select($imapConnection, $mailbox);
d4467150 21
65c3ec94 22sqimap_messages_delete($imapConnection, $message, $message, $mailbox);
23if ($auto_expunge) {
24 sqimap_mailbox_expunge($imapConnection, $mailbox, true);
25}
acaa9842 26
65c3ec94 27$location = get_location();
28if (isset($where) && isset($what)) {
29 header("Location: $location/search.php?where=" . urlencode($where) .
30 '&what=' . urlencode($what) . '&mailbox=' . urlencode($mailbox));
31} else {
32 header("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=" .
33 urlencode($mailbox));
34}
a48fbf9b 35
65c3ec94 36sqimap_logout($imapConnection);
35586184 37?>