Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here you can see the example mail processing Report generated by JEMHC for this Test Case. Within the report it states that a the Custom Field Default has applied this value.

...

Gather all email headers and set as the Custom Field value

This script will gather all of the email headers and values and will set as the Custom Field Value

Example Script

Code Block
var headerNames = Object.keys(message.getAllHeaders());
var headerValues = Object.values(message.getAllHeaders());
var value = "";

for (var i = 0; i < headerNames.length; i++) 
{
    print(headerNames[i] + ": " + headerValues[i]);
    var value = value + headerNames[i] + ": " + headerValues[i] + "\n";
}
setValue(value);

Test Case

Code Block
MIME-Version: 1.0
Received: by 10.223.112.12 with HTTP; Sat, 18 Jun 2011 22:42:26 -0700 (PDT)
Date: Sun, 19 Jun 2011 17:42:26 +1200
Example: Test value
Subject: This is the email subject
From: ryan@thepluginpeople.com
To: test@test.com
Content-Type: text/plain; charset=UTF-8

This is an example email
example: 100

Processing Report

As we can see the Report states that the Custom Field Default has set all of the email headers within the Paragraph Custom Field.

...

Filter by label (Content by label)
showLabelsfalse
max5
sortmodified
showSpacefalse
reversetrue
cqllabel in ( "custom-field-default" , "scripting" , "issue" ) and space = "JEMHC" and type = "page"