Skip to Content
0

dynamically read the Attachment name using sender mail adapter

Oct 30, 2017 at 04:48 PM

71

avatar image
Former Member

Hi Team,

We have configured a sender email adapter to receive different extension of file attachments and save them to a file system. What we are having a problem with is reading the attachment name. So we are using Dynamis Configuration to create the file name using the subject line - Which is not ideal. Ideally we would like to use the same name as the origianl attachment but haven't found any way of doing that.

We have tried with dynamic udf also but it didnt workout.

Could you please suggest any option to take the attachment name into payload.

Regards,

Geetha

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member
Oct 31, 2017 at 03:41 PM
1

Hello Sampathi,
As it was said previously ASMA would help you to achive the desired result. Additionally, check the following great blog about its usage in practice: Stop using Mail Package! © – Simplify your mail receiver adapter scenarios

Best regards,
Vadym

Share
10 |10000 characters needed characters left characters exceeded
Manoj K Oct 30, 2017 at 05:30 PM
0

Use :

  • MultipartHeader Bean : To read all the Mail MIME values.
  • Dynamic COnfiguration Bean : Set the attachemnt name from MIME to the File Adapter's FileName attribute.

Br,

Manoj

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Manoj,

Me too have the same issue for my mail to file scenario. Can you please help me out in tracing where in the MIME header will my attachment name be saved. I am using PI 7.3 and I am not getting Content Description in my header.

0
avatar image
Former Member Oct 31, 2017 at 06:54 AM
0

Hi Manoj,

Thanks for your suggestion after reading the MIME values,Those values we call in the mapping using any dynamic udf or any other mapping hav to do?

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Oct 31, 2017 at 07:26 AM
0

Hi Sampathi!

You don't need any additional UDF for that.

Just follow Manoj's suggestion and enable ASMA attributes in file receiver adapter. Your file name will be taken from respective ASMA parameter.

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Evgeniy,

Me too have the same issue for my mail to file scenario. Can you please help me out in tracing where in the MIME header will my attachment name be saved. I am using PI 7.3 and I am not getting Content Description in my header.

0