File/plugins/spam_controls/functions.php

Description

NaSMail Spam Controls Plugin -- Functions Copyright (C) 2007 The NaSMail Project This file is part of NaSMail spam_controls plugin.

This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with plugin; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • version: $Id: functions.php 921 2007-10-16 11:48:30Z tokul $
Includes
 include_once (SM_PATH.'plugins/spam_controls/load_config.php') (line 32)

load configuration

 include_once (SM_PATH.'functions/forms.php') (line 29)

Dependency on form functions

Functions
spam_controls_changed_spam_folder (line 216)

Saves spam folder setting and updates mailbox cache, if necessary.

  • since: 1.1
void spam_controls_changed_spam_folder (object $option)
  • object $option: SquirrelOption Option data
spam_controls_links (line 99)

Creates links for read_body_header hook

  • return: html formated line for right table cell in read_body_header hook
string spam_controls_links (string $mailbox, integer $passed_id, [string $passed_ent_id = 0], [array $extra_args = array()])
  • string $mailbox
  • integer $passed_id
  • string $passed_ent_id
  • array $extra_args
spam_controls_loading_constants_do (line 124)

Loads constants used by plugin

void spam_controls_loading_constants_do ()
spam_controls_mailbox_controls_right_do (line 427)

Adds spam and ham buttons to mailbox listing controls in NaSMail 1.3+

  • since: 1.1
void spam_controls_mailbox_controls_right_do ()
spam_controls_mailbox_form_before_do (line 436)

Adds spam and ham buttons to mailbox listing controls in NaSMail 1.2

  • since: 1.1
void spam_controls_mailbox_form_before_do ()
spam_controls_move_before_move_do (line 337)

Processes spam_controls actions in mailbox listing

  • since: 1.1
void spam_controls_move_before_move_do ()
spam_controls_optpage_loadhook_folder_do (line 130)
void spam_controls_optpage_loadhook_folder_do ()
spam_controls_print_notification (line 232)

Prints information about learned spam and ham messages

  • since: 1.1
void spam_controls_print_notification ()
spam_controls_read_body_header_do (line 56)
void spam_controls_read_body_header_do ()
spam_controls_rebuild_sort_array (line 176)

Rebuilds message array

  • deprecated: Don't write code that depends on this function. It will be corified and use other name.
  • todo: code is shared between several plugin.
void spam_controls_rebuild_sort_array (stream $imapConnection, string $mailbox)
  • stream $imapConnection: IMAP connection resource
  • string $mailbox: Mailbox name
spam_controls_special_mailbox_do (line 204)

Tags Spam folder as special mailbox

  • since: 1.1
boolean spam_controls_special_mailbox_do (string $mailbox)
  • string $mailbox: Tested mailbox name
spam_controls_train_filters (line 269)

Feeds selected message or message part to training utility

  • return: Error message or empty string
  • since: 1.1
string spam_controls_train_filters (stream $imap_stream, string $mailbox, integer $msg_id, string $msg_part_id, integer $msg_type)
  • stream $imap_stream: IMAP connection resource
  • string $mailbox: Mailbox
  • integer $msg_id: Message ID
  • string $msg_part_id: Message Part ID
  • integer $msg_type: Message type. SPAM_CONTROLS_HAM and SPAM_CONTROLS_SPAM constants.

Documentation generated on Sun, 22 Nov 2009 17:36:33 +0200 by phpDocumentor 1.4.3