Skip to Content
author's profile photo Former Member
Former Member

Retrieval of attachment filename - receiver mail adapter


I am using the mail adapter to receive an e-mail into PI. This e-mail has an attached CSV file.

First, I am using the PayloadSwapBean to swap the application playload to the attachment payload

Second, I am using the MessageTransformBean to transform the CSV file into an XML document

These are both working fine and the message is then passing into the relevant message mapping.

However, I would like to be able to use the attachment filename in the message mapping.

Can anyone advise how to do this for the mail adapter ?

I've done it loads of times for the file adapter but never the mail adapter (when using attachments) so I am a bit stumped.

Any advice greatly received.



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 30, 2008 at 02:02 PM

    Hi Colin,

    You can use xslt mapping for converting the payload into a csv file and also for setting the filename for the attachment. Use Content Type and Content Disposition in the xslt itself and in the Content Disposition specify your filename.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Fariha Kazi

      Hi Progirl,

      I want to dynamically set the name of attachment in receiver mail Communication Channel.

      Example: IN__9907211000004_4048454000005_20081211_01000000002643

      The first two numbers 9907211000004 & 4048454000005 I want to read it from the message

      20081211 this is the date and

      And againg this number 01000000002643 is read from message.

      I read from your response. You had created adapter module for the similar purpose. Can you share it. Since I am new to writing Adapter Module.

      Thank You in Advance.