OTRS 5.0 API Reference Perl

Description manuals and libraries
OTRS 5.0 API Reference Perl > Perl Modules > Kernel::System::PostMaster::Filter

NAME

Kernel::System::PostMaster::Filter

SYNOPSIS

All postmaster database filters

PUBLIC INTERFACE

new()

create an object. Do not use it directly, instead use:

    use Kernel::System::ObjectManager;
    local $Kernel::OM = Kernel::System::ObjectManager->new();
    my $FilterObject = $Kernel::OM->Get('Kernel::System::PostMaster::Filter');
FilterList()

get all filter

    my %FilterList = $PMFilterObject->FilterList();
FilterAdd()

add a filter

    $PMFilterObject->FilterAdd(
        Name           => 'some name',
        StopAfterMatch => 0,
        Match = {
            From => 'email@example.com',
            Subject => '^ADV: 123',
        },
        Set {
            'X-OTRS-Queue' => 'Some::Queue',
        },
    );
FilterDelete()

delete a filter

    $PMFilterObject->FilterDelete(
        Name => '123',
    );
FilterGet()

get filter properties, returns HASH ref Match and Set

    my %Data = $PMFilterObject->FilterGet(
        Name => '132',
    );

TERMS AND CONDITIONS

This software is part of the OTRS project (https://otrs.org/).

This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.