none
How to change the file name In Pipline RRS feed

  • Question

  • hi

    i have a solution which will receive the attachments using POP3 adapter.

    i am receving the files with .ppt as extenstion.i want to cahange the file name if the attachment name like .ppt to .ppt1.

    i want to do it in the pipline component.

    Please help me.

    Regards

    Mahesh

    Tuesday, May 29, 2012 6:56 AM

Answers

  • POP3 messages are MIME encoded messages which contain multiple parts.  Typically a main body part (the email message) and 0 or more attachments.  I'm not sure if you can access part properties (MIME headers) for multipart messages directly from the standard pipeline components (except the body part specified as a static index setting in the POP3 adapter).  You may need to develop a custom pipeline component that will crack into the multipart message and modify the appropriate file attachment property(s).

    You can prototype this using a custom compoent that is installed into the decode stage of a receive pipeline.  Examine all the IBaseMessageParts within your IBaseMessage.  Next you can check the part properties to determine the filename.  Assuming you want to send the files to the FILE adapter after you are able to access the filename from the POP3 message, you can try setting the FILE.ReceivedFileName to have the output filename as you want.  If you are sending out the multipart message using a MIME compatible, send adapter, then modifying the POP3 or SMTP properties may work.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.




    Tuesday, May 29, 2012 8:58 PM

All replies

  • Hi,

    Check this post.


    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.

    Tuesday, May 29, 2012 12:38 PM
  • Hi , Thanks Bali,

    the post is for Send pipe line i think.

    I need to change the file name in receive pipe line and the changed file has receive in the orchestration.

    If i send the test.xml as an attchment ,it should rename to test.xml1 in receive pipe line .

    Regards

    Mahesh

    Tuesday, May 29, 2012 1:36 PM
  • POP3 messages are MIME encoded messages which contain multiple parts.  Typically a main body part (the email message) and 0 or more attachments.  I'm not sure if you can access part properties (MIME headers) for multipart messages directly from the standard pipeline components (except the body part specified as a static index setting in the POP3 adapter).  You may need to develop a custom pipeline component that will crack into the multipart message and modify the appropriate file attachment property(s).

    You can prototype this using a custom compoent that is installed into the decode stage of a receive pipeline.  Examine all the IBaseMessageParts within your IBaseMessage.  Next you can check the part properties to determine the filename.  Assuming you want to send the files to the FILE adapter after you are able to access the filename from the POP3 message, you can try setting the FILE.ReceivedFileName to have the output filename as you want.  If you are sending out the multipart message using a MIME compatible, send adapter, then modifying the POP3 or SMTP properties may work.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.




    Tuesday, May 29, 2012 8:58 PM