Kernel::System::PostMaster - postmaster lib
All postmaster functions. E. g. to process emails.
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 }, );
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)
to detect the ticket number in processing email
my ($TicketNumber, $TicketID) = $PostMasterObject->CheckFollowUp( Subject => 'Re: [Ticket:#123456] Some Subject', );
to get all configured PostmasterX-Header email headers
my %Header = $PostMasterObject->GetEmailParams();
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.