You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-04-12 14:49:35

Stril
Member
Registered: 2011-04-12
Posts: 10

Parse E-Mail for ticket generation

Hi!

I am trying to setup glpi to fetch mails and to create tickets.

Is there any possibility to parse the body of the mail and to set the parameters of the ticket?

The easiest way could be, to write parameters in the body like:
[asset]SystemXY[/asset]
[priority]4[/priority]
[text]This is the description of my Problem[/text]
.....

Did someone of you try something like that?

Best wishes,
Stril

Offline

#2 2011-04-12 15:14:32

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Parse E-Mail for ticket generation

In glpi 0.78 you can make your own notification


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2011-04-12 15:23:14

Stril
Member
Registered: 2011-04-12
Posts: 10

Re: Parse E-Mail for ticket generation

Hello yllen,

I do not need notifications. My users cannot access glpi "directly". So, there is a mailgenerator, where they can generate a ticket "remote".

I just need a way to read the mailbody and to assign the right priority, asset, etc according to its mail body.

Stril

Offline

#4 2011-04-12 16:55:53

Stril
Member
Registered: 2011-04-12
Posts: 10

Re: Parse E-Mail for ticket generation

Hi!

I found a solution:
If I parse the body in ./glpi/inc/mailcollector.class.php, I can set the parameters of the ticket:

e.g.:
        $searchstring= "[PRIORITY]";
        if (strlen(strstr($body,$searchstring))>0) {
        $tkt['priority'] = "5";
        $tkt['use_email_notification'] = 1;
        }
        else
        {
        $tkt['priority'] = "1";
        $tkt['use_email_notification'] = 0;
        }


Best wishes,
Stril

Offline

Board footer

Powered by FluxBB