IMP_Filter
in package
The IMP_Filter class contains all functions related to handling filtering messages in IMP.
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
Tags
Table of Contents
Methods
- blacklistMessage() : bool
- Adds the From address from the message(s) to the blacklist and deletes the message(s).
- canApplyFilters() : voolean
- Are appliable filters available?
- filter() : mixed
- Runs the filters if they are able to be applied manually.
- whitelistMessage() : bool
- Adds the From address from the message(s) to the whitelist.
- _processBWlist() : bool
- Internal function to handle adding addresses to [black|white]list.
Methods
blacklistMessage()
Adds the From address from the message(s) to the blacklist and deletes the message(s).
public
blacklistMessage(IMP_Indices $indices[, bool $show_link = true ]) : bool
Parameters
- $indices : IMP_Indices
-
An indices object.
- $show_link : bool = true
-
Show link to the blacklist management in the notification message?
Tags
Return values
bool —True if the messages(s) were deleted.
canApplyFilters()
Are appliable filters available?
public
static canApplyFilters() : voolean
Return values
voolean —True if appliable filters are available.
filter()
Runs the filters if they are able to be applied manually.
public
filter(string $mbox) : mixed
Parameters
- $mbox : string
-
The mailbox to apply the filters to.
Tags
whitelistMessage()
Adds the From address from the message(s) to the whitelist.
public
whitelistMessage(IMP_Indices $indices[, bool $show_link = true ]) : bool
Parameters
- $indices : IMP_Indices
-
An indices object.
- $show_link : bool = true
-
Show link to the whitelist management in the notification message?
Tags
Return values
bool —True if the messages(s) were whitelisted.
_processBWlist()
Internal function to handle adding addresses to [black|white]list.
protected
_processBWlist(IMP_Indices $indices, string $descrip, string $reg1, string $reg2, bool $link) : bool
Parameters
- $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 : bool
-
Show link to the whitelist management in the notification message?
Tags
Return values
bool —True on success.