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
显示文件
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 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. |
Runs the filters if they are able to be applied manually.
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. |