Extracting email body information into Dynamic fields

Moderator: crythias

Post Reply
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Extracting email body information into Dynamic fields

Post by Thomymaster »

Hi

I am trying to extract a field from an automated structured e-mail to OTRS.

Version: OTRS 5.0.21
Addon (OPM): EnhancedPostmaster Filter 5.0.2


The mail body looks like this:

---other content---
...
------SAMPLE INFORMATION------
Sample Name: BM058
Formular: C44H51N6O2+
Exact Mass: 695.4068
...
---content---

I have created the dynamic field "SampleName" and created a PostMaster filter.

However the dynamic field is not set, what am i doing wrong here? :(

Best,
Thomas
You do not have the required permissions to view the files attached to this post.
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Extracting email body information into Dynamic fields

Post by reneeb »

You should copy the regex to this thread. That would help us to read and test the regex...

You have quotes around "Sample Name". You sample mail has no quotes...
Add an \s+ after Sample.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: Extracting email body information into Dynamic fields

Post by Thomymaster »

Hi

The original regex was:
Sample Name:\s+(?<SampleName>\.*?)\s*Formular

So i now try with

Hi

The original regex was:
Sample\s+Name:\s+(?<SampleName>\.*?)\s*Formular
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
wurzel
Znuny guru
Posts: 3230
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Extracting email body information into Dynamic fields

Post by wurzel »

Hi,


try [***] in value section

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: Extracting email body information into Dynamic fields

Post by Thomymaster »

I don't think [***] will help as in the next step i want to be able to extract the "Formular" also
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Extracting email body information into Dynamic fields

Post by reneeb »

Can you provide a sample mail (.eml file, but please anonymize the personal data)?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: Extracting email body information into Dynamic fields

Post by Thomymaster »

Hi

Yes but i need an email adress, please

Best,
Thomas
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
Post Reply