Added "User-Agent" to possible headers with the mailer information.
[squirrelmail.git] / src / delete_message.php
CommitLineData
59177427 1<?php
895905c0 2
ef870322 3 /**
4 ** delete_message.php
5 **
895905c0 6 ** Copyright (c) 1999-2001 The SquirrelMail development team
ef870322 7 ** Licensed under the GNU GPL. For full terms see the file COPYING.
8 **
9 ** Deletes a meesage from the IMAP server
245a6892 10 **
11 ** $Id$
ef870322 12 **/
13
ff8a98e7 14 require_once('../src/validate.php');
15 require_once('../functions/display_messages.php');
16 require_once('../functions/imap.php');
d3cdb279 17
e1469126 18 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
d4467150 19
fe84f328 20 sqimap_mailbox_select($imapConnection, $mailbox);
21
a3cb3d5f 22 sqimap_messages_delete($imapConnection, $message, $message, $mailbox);
acaa9842 23 if ($auto_expunge)
8cf653ad 24 sqimap_mailbox_expunge($imapConnection, $mailbox, true);
acaa9842 25
1195c340 26 $location = get_location();
9d7140c9 27 if (isset($where) && isset($what))
1809bad8 28 header ("Location: $location/search.php?where=".urlencode($where)."&what=".urlencode($what)."&mailbox=".urlencode($mailbox));
29 else
30 header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox));
a48fbf9b 31
32 sqimap_logout($imapConnection);
ff8a98e7 33?>