IMP_Filter::blacklistMessage PHP Method

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.
    public function blacklistMessage($indices, $show_link = true)
    {
        if (!$this->_processBWlist($indices, _("your blacklist"), 'blacklistFrom', 'showBlacklist', $show_link) || !($msg_count = $indices->delete())) {
            return false;
        }
        $GLOBALS['notification']->push(ngettext("The message has been deleted.", "The messages have been deleted.", $msg_count), 'horde.message');
        return true;
    }