IBM Support

Mail Mime Parse Service with a example (detach)

Technical Blog Post


Abstract

Mail Mime Parse Service with a example (detach)

Body

Mail Mime Parse Service in Sterling B2B Integrator (SBI) :

 

Mail Mime Parse is a service designed to detach  MIME message from the primary document and extracts the message contents to the primary document and to the document area of process data.

Example to test the service 

 

Getting a Raw message :

In this example we will demonstrate on how the mail mime parse service detaches the document as a body and attachment by taking boundary as reference 

 

1. Go to your mailbox and pickup email that we received from apple devices etc (Inline attachment , signature of candidate ) is preferred 

2. Go to View-> Source -> Page source and copy the raw message which will be our primary document for our parse service

3. Please download the primary documents from the below link which  are used to test this service in both test cases

 

MimeTest_files

 

BPML Used

 

<process name="swaroopa_mailmime_parse">
  <sequence>
<operation name="Mail Mime Service">
<participant name="MailMimeService"/>
<output message="MailMimeServiceInputMessage">
<assign to="mail-mime-operation">parse</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>

 

Test 1:

 

When input is 20151203_Swaroopa_test_original.txt (Primary Document ) , here is the process data at Mail Mime Service 

 

image

 

 

 

 

 

 

 

 

 

 

 

As we can see in the above screenshot, the result of Mail Mime service

The body of the email says "This is a test. This is only a test." The attachment says only "This is a test". 

The attachment says " This is a test"

Test 2:

 

When input is 20151203_Swaroopa_test_adjusted.txt(Primary Document ) , here is the process data at Mail Mime Service 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As we can see in the above screenshot, the result of Mail Mime service

The body of the email says "This is a test". 

The attachment says "This is a test. This is only a test" where the results are swapped.

Observations

 

1. In Test1 , Mail Mime parse service parses the input document and detects boundary as the priority in the message and then detaches the message accordingly .i,e in this case body of the mail becomes Primary Document 

2. In Test2,  Mail Mime parse service parses the input document and detects boundary as the priority in any message and then detaching the message accordingly i,e  It does not actually differentiate if it is body or an attachment instead which ever message comes first after the boundary becomes primary document and the actual body becomes attachment

 

Note: The tests were performed on SBI 502040 .

 

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11121229