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.

 View Only
Expand all | Collapse all

SMTP email having Html body and file attachment problem

  • 1.  SMTP email having Html body and file attachment problem

    Posted Tue January 22, 2008 06:27 PM

    I cannot figure out how to generate an email that is text/html and send an attachment with it.

    I tried creating a Mime Data object, converted the html text string to bytes and then a stream, invoked the addBodyPart, invoke getEnvelopeStream, and then finally invoke smtp mapping my envStream to mimeStream and my attachment record to smtp’s attachments record…

    and I get the email ok, but I do not get the attachment.

    I have searched the forums prior to asking my question and I did not see a resolution. Please tell me what I am missing?

    Using wm dev 6.5


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 2.  RE: SMTP email having Html body and file attachment problem

    Posted Tue January 22, 2008 08:42 PM

    Did you ever notice that when you finally give up and post a message, thats about the time you finally find a solution…

    I ripped out that code and made it simpler. If you have a similar conundrum, here’s what I did…

    I created a new Document Type called ‘attachments’ with all the variables of the Document List ‘attachments’ used in the smtp service. Using the appendToDocumentList service, I appedned my excel filename to my ‘attachments’ List. I then convert the text/html message to a stream. Create another ‘attachments’ record to store that content and contenttype for the text, then use appendToDocumentList again to add the text to my outbound email document. Then I hook that DocumentList up to the smtp services ‘attachments’ and it sends both the spreadsheet and the body text in html.


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 3.  RE: SMTP email having Html body and file attachment problem

    Posted Thu April 10, 2008 12:36 PM

    Hi zoom,

    Our service will generate an HTML file…

    I need send that HTML file as an attachement to email address.

    Can you explain the steps that need to be followed.

    we are using 4.6 verson.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB