User requires to retrieve Header information of any email from the Mail Event Metadata.
In Adeptia the header information can be retrieved from the Email Content using a Custom Plugin (CP) activity. Attached is the Sample Custom Code (Mail Information.txt), using which the Mail header information can be retrieved from the Mail Event Metadata.
This Custom Plugin would be used in the Process Flow with which the Mail Event is bound and Mail for which we need to extract the information. The plugin should be the first activity in the Process Flow and it will set the information in Context that could be utilized further as per requirement.
To expose the variables such as host, username, protocol etc., we can use the below context code.
Similarly, other variables can also be exposed as per the requirement using the above approach.