
##########
PostMaster
##########


****
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:


.. code-block:: perl

     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


.. code-block:: perl

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


return params


.. code-block:: perl

     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


.. code-block:: perl

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



GetEmailParams()
================


to get all configured PostmasterX-Header email headers


.. code-block:: perl

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





