IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Service to get the body of an email in the pipeline

  • 1.  Service to get the body of an email in the pipeline

    Posted Fri August 01, 2003 10:44 AM

    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


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Service to get the body of an email in the pipeline

    Posted Fri August 01, 2003 10:53 AM

    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.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Service to get the body of an email in the pipeline

    Posted Fri August 01, 2003 11:04 AM

    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?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Service to get the body of an email in the pipeline



  • 5.  RE: Service to get the body of an email in the pipeline

    Posted Fri August 01, 2003 11:16 AM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 6.  RE: Service to get the body of an email in the pipeline

    Posted Wed September 10, 2003 10:56 PM

    Hi Chiraq,

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

    Bob


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Service to get the body of an email in the pipeline

    Posted Fri October 24, 2003 01:29 AM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: Service to get the body of an email in the pipeline

    Posted Wed February 18, 2004 06:15 AM

    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


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 9.  RE: Service to get the body of an email in the pipeline

    Posted Tue April 27, 2004 03:25 PM

    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


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB