otrs -> rel-6_0 API documentation

NAME

Kernel::System::PostMaster - postmaster lib

DESCRIPTION

All postmaster functions. E. g. to process emails.

PUBLIC INTERFACE

new()

Don't use the constructor directly, use the ObjectManager instead:

my $PostMasterObject = $Kernel::OM->Create(
    'Kernel::System::PostMaster',
    ObjectParams => {
        Email        => \@ArrayOfEmailContent,
        Trusted      => 1, # 1|0 ignore X-OTRS header if false
    },
);

Run()

to execute the run process

$PostMasterObject->Run(
    Queue   => 'Junk',  # optional, specify target queue for new tickets
    QueueID => 1,       # optional, specify target queue for new tickets
);

return params

0 = error (also false)
1 = new ticket created
2 = follow up / open/reopen
3 = follow up / close -> new ticket
4 = follow up / close -> reject
5 = ignored (because of X-OTRS-Ignore header)

CheckFollowUp()

to detect the ticket number in processing email

my ($TicketNumber, $TicketID) = $PostMasterObject->CheckFollowUp(
    Subject => 'Re: [Ticket:#123456] Some Subject',
);

GetEmailParams()

to get all configured PostmasterX-Header email headers

my %Header = $PostMasterObject->GetEmailParams();

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.