Need to retrieve the data from email body in wM

Hi wm experts,

I am looking to fetch the content of the email body from email sent to wM.

I followed the steps and I am able to get the details in pub.flow:getTransportInfo.
However when I try to get the body I am getting error

Steps I followed :

  1. created the port
  2. created the service as below
    pub.flow:gettransportInfo
    pub.flow:savepipeline
    pub.flow:restorepipeline

Hi,
I got the following link of an old post which might help you. Check the sample code here.
http://techcommunity.softwareag.com/ecosystem/communities/public/webmethods/products/esb_and_integration/codesamples/20120523141016523/

Hope this helps.

Thanks
-Sanjan

Hi Sanjan,

Thanks a lot.
I will try.
Do we have any other code sample to fetch the contents from the body.

Thanks
Preethi

Hello Preethi,

First you have to create a email port in IS server
webMethods/Email port
you have to configure the port properly specially the “Message Processing” based.
Once done please check whether your port is receiving the emails or not. If it is getting routed properly then you should be able to get the data in getTransportInfo

Regards,
Raj

Hi Raj,

Thanks for the message.
I have already configured my port and I am able to view the sender details.
However I am able to see null data inside the email/content after testing.

Also I am getting error as below

[175]2018-12-18 10:41:57 EST [ISP.0068.0013W] Error processing service: [ISS.0068.9006] Server Error: [ISS.0086.9249] Missing Parameter: inputStream
[174]2018-12-18 10:41:57 EST [ISP.0068.0025D] No content handler for content type multipart/alternative. Service TestP.rampreportsdummy:email_Test called without content handler.
[173]2018-12-18 10:41:57 EST [ISP.0068.0004T] Processed 1 new message(s)
[172]2018-12-18 10:41:56 EST [ISP.0068.0026D] Content type: multipart/alternative; boundary=“0000000000004722dc057d4dbb64” Subject: TestP.rampreportsdummy:email_Test

I have configured gmail settings on my port.Attaching the screeshot.

Also I have assigned a object of name “contentStream” on the input.
But looks like the data is not getting transferred to the pipeline.I can see the subject/from/to/timing of the test email on my code.

I am sending a body as just “TEST” with no other content.

Any idea on how to overcome this.

Hello Preethi,

You have to change some configuration in the Message processing of the email port
–Make the service call in default service and not in Global service.
– Invoke Service for each multipart make it “YES”

– No need to assgin any object first need to check what actually coming

just call the below services in your service
pub.flow:gettransportInfo
pub.flow:savepipeline

and check what is coming in the pipeline

Regards,
Raj