Create Article in perl (otrs6)

Moderator: crythias

Post Reply
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Create Article in perl (otrs6)

Post by steeman »

I want to create a new ticket with an article via a perl module. I managed to get it working, but it sends also a mail from the from-address (philip.steeman@mydomain) to the to-address (servicedesk@mydomain). I don't want that because via servicedesk@mydomain it gets a second time in OTRS (via mail, IMAP)

I use OTRS6

My code

Code: Select all

    $NewArticleBackendObject = $Kernel::OM->Get('Kernel::System::Ticket::Article')->BackendForChannel(ChannelName => 'Email');

    $subject = 'Subject';

    $NewArticleID = $NewArticleBackendObject->ArticleSend(
        TicketID             => $NewTicketID,
        SenderType           => 'customer',
        IsVisibleForCustomer => 1,
        UserID               => 1,
        From        => philip.steeman@mydomain,
        To          => 'Servicedesk <servicedesk@mydomain>',
        Subject     => $subject,
        Body        => $body,
        Charset     => 'iso-8859-15',
        MimeType    => 'text/plain',
        HistoryType    => 'NewTicket',
        HistoryComment => 'Aangemaakt via uitleenformulier',
        NoAgentNotify  => 0,
    );

In the Communicationlog I see this

Successfully queued message for delivery (MessageID: <1585036471.73920.3620406422@mydomain>, To: 'servicedesk@mydomain', From: 'philip.steeman@mydomain', Subject: 'Subject').

The Article is correctly stored in the new Ticket.

What is the way to add an article to a new Ticket without the mail?

Thanks

Philip


[/code]
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Create Article in perl (otrs6)

Post by jojo »

You used ArticleSend which for sure sends the Article. Use ArticleCreate instead
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: Create Article in perl (otrs6)

Post by steeman »

Thanks, this works
I didn't find this method but it is inherited.
sshenoy
Znuny newbie
Posts: 6
Joined: 25 Jul 2019, 10:39
Znuny Version: OTRS 6
Real Name: sushmitha shenoy

Re: Create Article in perl (otrs6)

Post by sshenoy »

Hi,

Is there any way to do achieve Article SEND in OTRS6 using GenericInterfaceREST ?

Thanks in Advance!
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Create Article in perl (otrs6)

Post by jojo »

not out of the box. There are commercial plugins (and it is possible from OTRS 7 on)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Create Article in perl (otrs6)

Post by root »

sshenoy wrote: 27 May 2020, 09:36 Hi,

Is there any way to do achieve Article SEND in OTRS6 using GenericInterfaceREST ?

Thanks in Advance!
Hi,

Use the open-source add-on Znuny4OTRS-GIArticleSend

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply