Access Email Headers in Batch XML

The user can now access the Email Headers for the batches executed via Mail-Import functionality. This information would be available in the batch.xml of the batch. Also, each page of the batch would hold a reference in the batch.xml to the Email of which it is a part.

 

Configurations

User needs to set the properties in the mail-import.properties file to fetch the header information.

The file is located at: Ephesoft\Application\WEB-INF\classes\META-INF\dcma-mail-import\mail-import.properties

  • dcma.mail.headers_switch

The value of this property decides whether to pull in header information or not. By default, the value is set as ON i.e. the header information is pulled by default.

  • dcma.mail.required_headers

The value of this property holds the list of headers that needs to be fetched separated by semicolon.

For example, dcma.mail.required_headers=Subject;To;From.

In the above example only Subject, To and From headers will be available in batch.xml.

If you want to fetch all the headers from the mail, then set the value of this property to ALL (dcma.mail.required_headers=ALL).

By default, the value of this property is set as ‘From;To;Date;Subject’.

Results:

Continuing with the default configurations.

There are two scenarios depending upon whether the Email clubbing switch is ON or OFF.

Case 1: Without Email Clubbing

In case the Email clubbing feature is OFF there is only one mail per batch.

So There will be headers of only one email in the batch.xml and each page of the batch would have a reference to that header in the batch.xml

The Figure above shows the Email Headers schema in the batch.xml.

As Email Clubbing feature is OFF in this case, so there is only one <Email> tag.

The <Email> tag contains the headers in the <Headers> tag where headers are present as a Name and Value pair. The value of the configured headers are available in the batch.xml as shown above.

The <Email> tag further contains the <Id>, <Subject> and <Date> tags.

The <Subject> and <Date> work as unique identifier for the mail i.e. to map the Email with the mail server.

The <Id> tag is to map the email with the pages in the document.

Each <Page> tag of the batch would have a tag <SourceEmailID> referring to the Id of the email of which it is a part as shown in figure below.

Case 2: With Email Clubbing

In case the Email clubbing feature is ON, there can be more than one Email per batch.

So Headers of more than one Email will be there in the batch.xml.

In this case as the Email clubbing feature was ON, 2 Emails have been clubbed and Headers of both are available in the batch.xml. The Pages in the Email will have their <SourceEmailID> referring to the Email of which they are part.

Access Email Headers in Batch XML

The user can now access the Email Headers for the batches executed via Mail-Import functionality. This information would be available in the batch.xml of the batch. Also, each page of the batch would hold a reference in the batch.xml to the Email of which it is a part.

 

Configurations

User needs to set the properties in the mail-import.properties file to fetch the header information.

The file is located at: Ephesoft\Application\WEB-INF\classes\META-INF\dcma-mail-import\mail-import.properties

  • dcma.mail.headers_switch

The value of this property decides whether to pull in header information or not. By default, the value is set as ON i.e. the header information is pulled by default.

  • dcma.mail.required_headers

The value of this property holds the list of headers that needs to be fetched separated by semicolon.

For example, dcma.mail.required_headers=Subject;To;From.

In the above example only Subject, To and From headers will be available in batch.xml.

If you want to fetch all the headers from the mail, then set the value of this property to ALL (dcma.mail.required_headers=ALL).

By default, the value of this property is set as ‘From;To;Date;Subject’.

Results:

Continuing with the default configurations.

There are two scenarios depending upon whether the Email clubbing switch is ON or OFF.

Case 1: Without Email Clubbing

In case the Email clubbing feature is OFF there is only one mail per batch.

So There will be headers of only one email in the batch.xml and each page of the batch would have a reference to that header in the batch.xml

The Figure above shows the Email Headers schema in the batch.xml.

As Email Clubbing feature is OFF in this case, so there is only one <Email> tag.

The <Email> tag contains the headers in the <Headers> tag where headers are present as a Name and Value pair. The value of the configured headers are available in the batch.xml as shown above.

The <Email> tag further contains the <Id>, <Subject> and <Date> tags.

The <Subject> and <Date> work as unique identifier for the mail i.e. to map the Email with the mail server.

The <Id> tag is to map the email with the pages in the document.

Each <Page> tag of the batch would have a tag <SourceEmailID> referring to the Id of the email of which it is a part as shown in figure below.

Case 2: With Email Clubbing

In case the Email clubbing feature is ON, there can be more than one Email per batch.

So Headers of more than one Email will be there in the batch.xml.

In this case as the Email clubbing feature was ON, 2 Emails have been clubbed and Headers of both are available in the batch.xml. The Pages in the Email will have their <SourceEmailID> referring to the Email of which they are part.

Was this article helpful to you?

wikiadmin

Comments are closed.