59177427 |
1 | <?php |
ef870322 |
2 | /** |
3 | ** delete_message.php |
4 | ** |
5 | ** Copyright (c) 1999-2000 The SquirrelMail development team |
6 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
7 | ** |
8 | ** Deletes a meesage from the IMAP server |
9 | ** |
10 | **/ |
11 | |
2a32fc83 |
12 | session_start(); |
13 | |
d068c0ec |
14 | if (!isset($config_php)) |
15 | include("../config/config.php"); |
16 | if (!isset($strings_php)) |
17 | include("../functions/strings.php"); |
18 | if (!isset($page_header_php)) |
19 | include("../functions/page_header.php"); |
20 | if (!isset($display_message_php)) |
21 | include("../functions/display_messages.php"); |
22 | if (!isset($imap_php)) |
23 | include("../functions/imap.php"); |
d4467150 |
24 | |
d3cdb279 |
25 | include("../src/load_prefs.php"); |
26 | |
e1469126 |
27 | $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); |
813eba2f |
28 | sqimap_mailbox_select($imapConnection, $mailbox); |
d4467150 |
29 | |
a3cb3d5f |
30 | sqimap_messages_delete($imapConnection, $message, $message, $mailbox); |
acaa9842 |
31 | if ($auto_expunge) |
8cf653ad |
32 | sqimap_mailbox_expunge($imapConnection, $mailbox, true); |
acaa9842 |
33 | |
1195c340 |
34 | $location = get_location(); |
1809bad8 |
35 | if ($where && $what) |
36 | header ("Location: $location/search.php?where=".urlencode($where)."&what=".urlencode($what)."&mailbox=".urlencode($mailbox)); |
37 | else |
38 | header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox)); |
a48fbf9b |
39 | |
a2790a61 |
40 | sqimap_mailbox_close($imapConnection); |
a48fbf9b |
41 | sqimap_logout($imapConnection); |
d4467150 |
42 | ?> |