\n";
/*
Catch situation when user use quick_email and does not update
preferences. User gets web_form link. If prefs are set to
quick_email format - they will be updated after clicking the link
*/
if (! $spamcop_quick_report && $spamcop_method=='quick_email') {
$spamcop_method = 'web_form';
}
if ($spamcop_method == 'web_form') {
?>
_("SpamCop - Spam Reporting"),
'url' => '../plugins/spamcop/options.php',
'desc' => _("Help fight the battle against unsolicited email. SpamCop reads the spam email and determines the correct addresses to send complaints to. Quite fast, really smart, and easy to use."),
'js' => false
);
}
// When we send the email, we optionally trash it then too
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;
}
}
?>