cancel
Showing results for 
Search instead for 
Did you mean: 

XI mail adapter - File name should be same in attachment

Former Member
0 Kudos

Hi all,

Here is our scenario:

First part of our scenario involves picking *.pgp (e.g. addressB.pgp) file from partner FTP server and after decrypting put it on local Unix path - This part works ok

In second part, we send this file by mail to static mail receivers as attachment

(Message Protocol - XIPAYLOAD, Use Mail Package and Keep Attachments unchecked)

When we receive this file as attachment, the attachment name is some random value, we need to keep the attachment name same.

i.e. If we are picking and sending file "addressB.txt" then in mail attachment name should be "addressB.txt"

Please suggest how this can be done

Thanks

Girish

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can use the idea from my blog:

/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

jut pick the name from the ASMA (dynamic configuration) and not from the message itself

then you will have the scenario working

BTW

I'm affraid it cannot be done in standard

Regards,

Michal Krawczyk

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks all for your inputs !

Former Member
0 Kudos

Hi Michal,

Thanks for your response

May be my question now is too basic

There is no mapping involved in this scenario, file I am picking is *.txt file

So where do include code that is mentioned in your blog

Adapter specific attributes are set in sender adapter

Thanks

Girish

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

code -> in the adapter module for the mail receiver adapter

but you need to change it to take the name from the dynamic configuration of course

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal,

I am a beginner in XI

Can you send me development steps in more detail

I am not sure how I can put code in adapter module for mail adapter (i.e. in configuration part)

I am aware that code / UDF can be included in Design part, but in current scenario there are no objects in design part

Thanks

Girish

shweta_walaskar2
Contributor
0 Kudos

Hi Girish,

We have a same scenario where XI is picking file from R/3 directory and sending it as a mail attachment without any mapping,the attachment name was supposed to be same,ex: abc.csv.

I had the same problem,that every time I used to receive a randon attachment name like att34.txt,etc (recipient might be afraid that this is a virus )

To resolve this,please add these modules in your mail receiver:

1 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean Transform

Transform Transform.ContentDisposition attachment;filename="abc.csv"

Transform Transform.ContentType text/plain;charset="UTF-8"

If you use this,your attachment name will always be abc.csv.

Kindly let us know if this works for you.

Thanks.

Regards,

Shweta

Former Member
0 Kudos

Hi Shweta,

Thanks for your inputs,

Using this configuration I was able to get constant file name (i.e. abc.txt)

Is there a way to make file name dynamic, i.e. attachment name should be same as file we are picking

Regards,

Girish

former_member200962
Active Contributor
0 Kudos

if i am not wrong the standard adapter module wont allow you to do a dynamic configuration of the filename...the setting mentioned above will give you a static (fixed value).....so you need to have your own adapter module in the receiver CC with the Dynamic configuration logic....

Regards,

Abhishek.