
###########
ArticleSend
###########


****
NAME
****


Kernel::System::ProcessManagement::TransitionAction::ArticleSend - A module to send article


********
SYNOPSIS
********


All ArticleSend functions.


****************
PUBLIC INTERFACE
****************


new()
=====


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


.. code-block:: perl

     my $ArticleSendObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::TransitionAction::ArticleSend');



Run()
=====


Runs TransitionAction ArticleSend.


.. code-block:: perl

     my $Success = $ArticleSendActionObject->Run(
         UserID                   => 123,
         Ticket                   => \%Ticket,   # required
         ProcessEntityID          => 'P123',
         ActivityEntityID         => 'A123',
         TransitionEntityID       => 'T123',
         TransitionActionEntityID => 'TA123',
         Config                   => {
             SenderTypeID         => 1,                                             # (required)
                                                                                    # or
             SenderType           => 'agent',                                       # (required) agent|system|customer
             IsVisibleForCustomer => 1,                                             # (required) Is article visible for customer?
             UserID               => 123,                                           # (required)
 
             From        => 'Some Agent <email@example.com>',                       # required
             To          => 'Some Customer A <customer-a@example.com>',             # required if both Cc and Bcc are not present
             Cc          => 'Some Customer B <customer-b@example.com>',             # required if both To and Bcc are not present
             Bcc         => 'Some Customer C <customer-c@example.com>',             # required if both To and Cc are not present
             ReplyTo     => 'Some Customer B <customer-b@example.com>',             # not required, is possible to use 'Reply-To' instead
             Subject     => 'some short description',                               # required
             Body        => 'the message text',                                     # required
             InReplyTo   => '<asdasdasd.12@example.com>',                           # not required but useful
             References  => '<asdasdasd.1@example.com> <asdasdasd.12@example.com>', # not required but useful
             Charset     => 'iso-8859-15',
             MimeType    => 'text/plain',
             Loop        => 0, # 1|0 used for bulk emails
             HistoryType    => 'OwnerUpdate',                                       # Move|AddNote|PriorityUpdate|WebRequestCustomer|...
             HistoryComment => 'Some free text!',
             NoAgentNotify  => 0,                                                   # if you don't want to send agent notifications
 
             Queue   => 'Misc',                                                     # optional, use system address of queue as "From" parameter
             QueueID => 123,                                                        # optional, use system address of queue id as "From" parameter
 
             # Attachment optional:
             Attachments      => 'StdAttachmentName1,StdAttachmentName2',           # optional, comma separated StandardAttachment Names
             AttachmentIDs    => '1,2,3',                                           # optional, comma separated StandardAttachment ID
             AttachmentsReuse => 1                                                  # optional, 1|0 - Reuse of attachments stored in the dynamic field configured in Process::DynamicFieldProcessManagementAttachment.
 
             Template   => 'Template 1',                                            # Use template to replace in Body by Tag <OTRS_TA_TEMPLATE>
             TemplateID => 1,                                                       # Use template id to replace in Body by Tag <OTRS_TA_TEMPLATE>
 
             Salutation   => 'Salutation 1',                                        # Use salutation to replace in Body by Tag <OTRS_TA_SALUTATION>
             SalutationID => 1,                                                     # Use salutation id to replace in Body by Tag <OTRS_TA_SALUTATION>
 
             Signature   => 'Signature 1',                                          # Use signature to replace in Body by Tag <OTRS_TA_SIGNATURE>
             SignatureID => 1,                                                      # Use signature id to replace in Body by Tag <OTRS_TA_SIGNATURE>
 
             UseTicketHook => 0,                                                    # optional, default: 1 - if you don't want to a ticket hook
         }
     );


Returns:


.. code-block:: perl

     Ticket contains the result of TicketGet including DynamicFields
     Config is the Config Hash stored in a Process::TransitionAction's Config key
 
     my $Success = 1;     # 0



ConvertText()
=============


This function will convert the content if the content type differs.


.. code-block:: perl

     my $Text = $TransitionActionObject->ConvertText(
         RichText    => 0,
         Content     => '<b>123</b> 123 123',
         ContentType => 'text/html',
     );


Returns:


.. code-block:: perl

     my $Text = '123 123 123';



FromGet()
=========


This function returns the from parameter for ArticleSend.


.. code-block:: perl

     my $From = $TransitionActionObject->FromGet(%Param);


Returns:


.. code-block:: perl

     my $From = 'user abc <test@test.de>';




