Ausgehendes E-Mail Ticket via Generic Interface

Hilfe zu Znuny Problemen aller Art
Locked
BlaBlaBlub22
Znuny newbie
Posts: 8
Joined: 07 Apr 2020, 08:42
Znuny Version: 6.0.29
Real Name: Jean

Ausgehendes E-Mail Ticket via Generic Interface

Post by BlaBlaBlub22 »

Hi Forum,

ich habe ein REST Generic Interface erstellt mit dem Beispiel von https://doc.otrs.com/doc/manual/admin/6 ... .12.10.7.2

Dieses geht auch wunderbar via PHP anzusprechen. Es Werden Tickets erstellt. Leider bekomme ich aber kein ausgehendes E-Mail Ticket hin. Es geht nie eine Mail vom OTRS raus. Immer sieht es so aus als ob der User ans Tiketsystem geschrieben hat. Meine Idee ist aber aus einem Programm heraus ein ausgehendes E-Mail Ticket zu generieren so wie man es über die OTRS Oberfläche bei "Neues E-Mail-Ticket" machen würde.

Ich hoffe jemand kann mir helfen. Meine Google Recherche hat leider nichts brauchbares zu Tage gefördert.

PHP Code

Code: Select all

<?php
header("Content-type: application/json; charset=utf-8");
require __DIR__ . '/vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client(['base_uri' => 'http://test-otrs.company.local/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/']);

$arrTicket = array(
    "Title"        => 'some ticket title',
    "Queue"        => 'testqueue',
    "Lock"         => 'unlock',
    "Type"         => 'Unclassified',
    "State"        => 'new',
    "Priority"     => '3 normal',
    "Owner"        => 'username',
    "CustomerUser" => 'user@test.com'
);

$arrArticle = array(
    "CommunicationChannel"  => 'Email',
    "SenderType"            => 'agent',
    "To"                    => 'user@test.com',
    "Subject"               => 'some subject',
    "Body"                  => 'some body',
    "ContentType"           => 'text/plain; charset=utf8'
);

$response = $client->post('Ticket', ['json' => array("UserLogin" => "username", "Password" => "testtesttest", "Ticket" => $arrTicket, "Article" => $arrArticle)]);

if ($response->getBody())
    {
    echo $response->getBody();
    }
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Ausgehendes E-Mail Ticket via Generic Interface

Post by jojo »

Dies geht in der ((OTRS)) Community Edition 6 nicht ohne Zusatzmodul. In der kommerziellen Version ist dies Out of the box möglich.
"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: 4250
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Ausgehendes E-Mail Ticket via Generic Interface

Post by root »

Hi,

mit dem kostenlosen Modul Znuny4OTRS-GIArticleSend kannst Du auch per GenericInterface E-Mails versenden.

- 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 ?
BlaBlaBlub22
Znuny newbie
Posts: 8
Joined: 07 Apr 2020, 08:42
Znuny Version: 6.0.29
Real Name: Jean

Re: Ausgehendes E-Mail Ticket via Generic Interface

Post by BlaBlaBlub22 »

Hi Roy,

!!! 1000 Dank !!!

Dachte schon ich bin zu blöd. Hatte schon die Befürchtung es wäre so gewollt. Schade das dem so ist und gut das es eine Lösung gibt. Die funktioniert perfekt.
Locked