[imp] delete message after report as spam
David Chang
david at thbuo.gov.tw
Tue May 20 00:04:14 PDT 2003
Hi all:
Since nobody like spam,why not delete them after reported ?
Here are patches that i just used.
imp/message.php
===============
164a165,178
> /* Delete Spam after report */
> if ($conf['spam']['delete_after_report']) {
> require_once IMP_BASE . '/lib/Message.php';
> $imp_message = &new IMP_Message();
> $imp_message->setMailboxObject($imp_mailbox);
> $imp_message->delete();
> if ($prefs->getValue('mailbox_return')) {
> _returnToMailbox($imp_mailbox->getMessageIndex());
> require IMP_BASE . '/mailbox.php';
> exit;
> }
> $notification->push(_("The message has been deleted."), 'horde.message');
> }
>
imp/mailbox.php
===============
179a180,193
>
> /* Delete Spam after report */
> if ($conf['spam']['delete_after_report'] && !empty($indices)) {
> require_once IMP_BASE . '/lib/Message.php';
> $imp_message = &new IMP_Message();
> $imp_message->delete($indices);
> /* For POP3, redirect so that refreshing the page doesn't delete more m
essages accidentally. */
> if (strstr($imp['base_protocol'], 'pop3')) {
> header('Location: ' . Horde::url($mailbox_url, true));
> exit;
> }
> $notification->push(sprintf(_("%d message(s) have been deleted."), $msg
_count), 'horde.message');
>
> }
imp/config/conf.xml
====================
116a117
> <configstring name="delete_after_report" desc="Should we delete them after
report?">true</configstring>
David Chang
More information about the imp
mailing list