Service to get the body of an email in the pipeline

Hi,
I would like to know if anyone knows of a service I can use to get the body of an email(not an attachment) in the pipeline. I’ve tried the gettransportinfo service but it only works for attachments, not the body of the mail.
Thanks

Hi,

You can definitely get the body of the mail in the pipeline.
Please go thru
[url=“wmusers.com”]wmusers.com

to get more info.

Hi Chiraq,

nowhere in the discussion you supplied there is a answer on how to do this, except to write your own content handler. Is there then no existing service in webMethods 6 to get the body of a mail into the pipeline?

I’ve found the same problem on the Advantage webpage which someone experienced URL: [url=“http://advantage.webmethods.com/cgi-bin/advantage/main.jsp?w=0&targChanId=-536880991&tid=1610616779”]http://advantage.webmethods.com/cgi-bin/advantage/main.jsp?w=0&targChanId=-536880991&tid=1610616779[/url] , but no one was able to solve it.

Hi Rudi,

I use webMethods 4.6 with Trading Networks.

I use getTransportInfo function to get the info of incoming mail.
The mails are configured using a Port (look at security->Port, and configure a POP3 or IMAP account to receive emails from).
when the mail is retrieved by webMethods it will execute a service (name of the service is defined along with the port settings).

In the service, i call getTransportInfo service, i look at “email/content” stream within it. i convert that stream to string and get the data. the issue is that the amount of data that can be retrieved by default is small, as the built in content handler for email is not designed for large data. But you can still retrieve hugh attachments, there is no restrtiction on attachments.

i am not sure how to write a content handler, and the data comes to me as attachment… Only certain flags, or additional information is populated under the body of the mail.

i hope this helps.

Hi Chiraq,

How are you handling large attachments? I have a requirement to keep memory usage to a minimum.

Bob

chirag, I believe email/content ONLY gets populated when you have an attachment. I have tested this and can not get the email body into a field, whether I use getTransportInfo or note. Like others, my email body shows up as the field name, as opposed to values-- which stays as set as NULL. Event the Mime samples, asssume you can map your Mime stream into the values of a pre-defined object.

The workaround I’m taking, is putting my fields directly in the Email Subject. When I call getTransportInfo, the Subject field gets populated correctly. I can get away with this b/c I have a small # of fields. I would still like to pursue using the body of the email, as opposed to subject, but haven’t gotten this to work quite yet. I’m wondering if you name an Input object as a specific field name this would stream in properly? I tested “InputSteam” and “node” as the names, but still the email body does not reach the values of the object.

if you specify your body as name value pairs , the pair appears in the pipeline
eg:
Give Email body as
body= this is the email body

this will put a string “body” in the pipeline with value as " this is the email body "

rgds

Thank you for your tip Rajoy! Let me tell you what I found out when I tried to put multiple key/value pairs in the pipeline:

If you separate the key/value pairs with “&” you can even put multiple key/value pairs in the pipeline. For example the email body “keyA=valueA&keyB=valueB” will result in two string fields “keyA” and “keyB” with the values “valueA” and “valueB” in the pipeline