I'm using OTRS API Rest interface on as entry point for creating ticket in OTRS system. It works ok for one agent and customer. Now I would like to add option to send Notifications on TiicketCreate and TicketUpdate event as CC email.
I looked at documentation for Perl Modules > Kernel::GenericInterface::Operation::Ticket::TicketCreate but I couldn't find anything useful (https://otrs.github.io/doc/api/otrs/4.0 ... te.pm.html).
CC option is supported in OTRS web interface. It also works if I hardcode Cc email to module Kernel::System::Ticket::Article into subroutine SendAgentNotification (parameter Cc => 'testemail.test.com). The question is how to pass CC value from JSON object received by OTRS Rest API to SendAgentNotification subroutine.
Hardcoded CC email.
Code: Select all
# send notify
$Kernel::OM->Get('Kernel::System::Email')->Send(
From => $ConfigObject->Get('NotificationSenderName') . ' <'
. $ConfigObject->Get('NotificationSenderEmail') . '>',
To => $User{UserEmail},
Cc => 'testemail.test.com,
Subject => $Notification{Subject},
MimeType => $Notification{ContentType} || 'text/plain',
Charset => $Notification{Charset},
Body => $Notification{Body},
Loop => 1,
);
Regards,