none
How to Handle nested MultiPart MIME message

    Question

  • I am trying to create a sample applications for processing Nested Multipart MIME messages.

    I was able to process the Multipart MIME messages,  Now I am trying to work on the Nested Multipart MIME messages.

    Please help me about this.

    Tuesday, January 13, 2009 8:48 PM

All replies

  • It depends on what bits you are interested in I guess. If all you want is the content of the inner messages you can have a receive location with the s/component that extracts the inner messages from it, and a send port that filters on that first receive location that saves the inner messages to file, then have a second receive location pick up the inner messages from the folder.
    Thiago Almeida - http://connectedthoughts.wordpress.com
    Wednesday, January 14, 2009 5:19 AM
    Answerer
  • Thiago,
         
            Thanks for your response.   what do you mean by the s/Component ?, is it MIME/SMIME decoder.

    Actually MIME/SMIME decoder is working well for Multipart MIME message, but not for the Nested multipart MIME.

    When i send the Nested Multipart MIME message, it is generating an empty message only.

    Here is my Nested Multipart message

    MIME-Version:1.0
    Content-Type: multipart/mixed; boundary="----=_Part1"

    ------=_Part1
    MIME-Version:1.0
    Content-Type: multipart/related;       boundary="----=_Part"; start="<1223402395512>"; type="text/xml"
    Content-ID: <1223402395476>

    ------=_Part
    MIME-Version:1.0
    Content-Type: text/xml; charset=UTF-8
    Content-ID: <1223402395512>

    Nested Mime1 part1
    ------=_Part
    MIME-Version:1.0
    Content-Type: text/xml; charset=UTF-8
    Content-ID: <1223402395512>

    Nested Mime1 part2
    ------=_Part
    ------=_Part1--


    Thanks
    GiriCh



    • Marked as answer by GiriCh Tuesday, January 20, 2009 2:48 PM
    • Unmarked as answer by GiriCh Tuesday, January 20, 2009 2:48 PM
    Wednesday, January 14, 2009 4:22 PM
  • Sorry for the delay. Yes, I did mean the MIME/SMIME component. My idea was to do a double hop: pass the original message through that pipeline once for the outer mime message and save each inner part back to a file, then pass each of those files through the pipeline again for the inner messages. I have no way to test this at the moment but it might be worth a try.
    Thiago Almeida - http://connectedthoughts.wordpress.com
    Wednesday, January 21, 2009 12:21 AM
    Answerer
  • I had tried in the same way as you mentioned . but it did not work for me.

    If the inner part is MIME , it is generating empty message. For the bellow example it generating only one empty message.

    example:

    MIME-Version:1.0
    Content-Type: multipart/mixed; boundary="----=_Part1"

    ------=_Part1
    MIME-Version:1.0
    Content-Type: multipart/related;       boundary="----=_Part"; start="<1223402395512>"; type="text/xml"
    Content-ID: <1223402395476>

    ------=_Part
    MIME-Version:1.0
    Content-Type: text/xml; charset=UTF-8
    Content-ID: <1223402395512>

    Nested Mime1 part1
    ------=_Part
    MIME-Version:1.0
    Content-Type: text/xml; charset=UTF-8
    Content-ID: <1223402395512>

    Nested Mime1 part2
    ------=_Part
    ------=_Part1--




    if one of inner part is text/XML, it generating message with that part.

    example: for the below example it is generating a message with (text part) as the content, it is ignoring the other parts.

     MIME-Version:1.0
    Content-Type: multipart/mixed; boundary="----=_Part1"

    ------=_Part1
    MIME-Version:1.0
    Content-Type: multipart/related;       boundary="----=_Part"; start="<1223402395512>"; type="text/xml"
    Content-ID: <1223402395476>

    ------=_Part
    MIME-Version:1.0
    Content-Type: text/xml; charset=UTF-8
    Content-ID: <1223402395512>

    Nested Mime1 part1
    ------=_Part
    MIME-Version:1.0
    Content-Type: text/xml; charset=UTF-8
    Content-ID: <1223402395512>

    Nested Mime1 part2
    ------=_Part
    ------=_Part1
    MIME-Version:1.0
    Content-Type: 
    text/xml; charset=UTF-8;      
    Content-ID: <1223402395477>


    text part

    ------=_Part1--




    Wednesday, January 21, 2009 2:51 PM
  • Another thing to try is to put the nested mime messages through the mime encoder pipeline component on the send port (because the mime decoder might have stripped off a few things from the nested ones)...


    Thiago Almeida - http://connectedthoughts.wordpress.com
    Friday, January 23, 2009 12:35 AM
    Answerer