PHP Class IMP_Filter, horde

For full use, the following Horde API calls should be defined (These API methods are not defined in IMP): - mail/applyFilters - mail/canApplyFilters - mail/showFilters - mail/blacklistFrom - mail/showBlacklist - mail/whitelistFrom - mail/showWhitelist
Author: Michael Slusarz ([email protected])
Show file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
blacklistMessage ( IMP_Indices $indices, boolean $show_link = true ) : boolean Adds the From address from the message(s) to the blacklist and deletes the message(s).
canApplyFilters ( ) : voolean Are appliable filters available?
filter ( string $mbox ) Runs the filters if they are able to be applied manually.
whitelistMessage ( IMP_Indices $indices, boolean $show_link = true ) : boolean Adds the From address from the message(s) to the whitelist.

Protected Methods

Method Description
_processBWlist ( IMP_Indices $indices, string $descrip, string $reg1, string $reg2, boolean $link ) : boolean Internal function to handle adding addresses to [black|white]list.

Method Details

_processBWlist() protected method

Internal function to handle adding addresses to [black|white]list.
protected _processBWlist ( IMP_Indices $indices, string $descrip, string $reg1, string $reg2, boolean $link ) : boolean
$indices IMP_Indices An indices object.
$descrip string The textual description to use.
$reg1 string The name of the mail/ registry call to use for adding the addresses.
$reg2 string The name of the mail/ registry call to use for linking to the filter management page.
$link boolean Show link to the whitelist management in the notification message?
return boolean True on success.

blacklistMessage() public method

Adds the From address from the message(s) to the blacklist and deletes the message(s).
public blacklistMessage ( IMP_Indices $indices, boolean $show_link = true ) : boolean
$indices IMP_Indices An indices object.
$show_link boolean Show link to the blacklist management in the notification message?
return boolean True if the messages(s) were deleted.

canApplyFilters() public static method

Are appliable filters available?
public static canApplyFilters ( ) : voolean
return voolean True if appliable filters are available.

filter() public method

Runs the filters if they are able to be applied manually.
public filter ( string $mbox )
$mbox string The mailbox to apply the filters to.

whitelistMessage() public method

Adds the From address from the message(s) to the whitelist.
public whitelistMessage ( IMP_Indices $indices, boolean $show_link = true ) : boolean
$indices IMP_Indices An indices object.
$show_link boolean Show link to the whitelist management in the notification message?
return boolean True if the messages(s) were whitelisted.