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

How to send email received as an attachment

  • 1.  How to send email received as an attachment

    Posted Thu January 02, 2020 03:54 AM

    Hello Experts,

    Seeking for your kind assistance on the below concern.
    I am receiving email from our client via emaillistener and getting details via getTransportInfo. I have a requirement where I need to revert back the whole email as “attachment” if there’s an error message. Handling error message is now okay and all configuration are fine. However, I tried to use pub.client.smtp and explore “attachments” parameter but wasn’t able revert back the email.any tips? thank you.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: How to send email received as an attachment

    Posted Mon January 06, 2020 08:44 AM

    Hi Mor,

    you can try the following approach:

    • convert the received email object to a String or byte array
    • add this to your smtp call as attachment and set the content type accordingly.
      – you might want to use indexed mapping (index=0 for first attachment) when not building up an attachments list via appendToList service.
    • set encoding to base64.

    See IS Built-In-Services reference for further information.

    Regards,
    Holger


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: How to send email received as an attachment

    Posted Mon January 06, 2020 09:19 PM

    Hello Holger,

    Thank you for you response.
    I already did the steps below but still not working.my next question is, if I want to forward the whole email received via getTransoirtInfo, should I convert the whole “email” document inside this flow to byte array? or only the content?

    Here’s my setting:
    contenttype: application/vnd.ms-outlook (do you know any contenttype for outlook email?)
    encoding: I tried base64 and no input (still same result)

    There’s also a thing in outlook that if I set filename to “.msg” I cannot open the file because of some permission issue.


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB