cancel
Showing results for 
Search instead for 
Did you mean: 

How to send original filename as the attachment name through mail adapter?

0 Kudos

Hi,

I have a File to Mail scenario where the file is picked up from a folder in R/3 system and is sent as an attachment through mail. The requirement is to send the file unconverted and with the same file name.

When tried without creating any ESR objects, it was sending the file with the name Untitled.xml.

Since the filename has to be picked dynamically, I am not able to configure it through module parameters also (where we can set it through Content_Disposition)

I tried configuring it as mentioned in the following link: [http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=138084630]

But still it is going as Untitled.xml with the whole mail package as the content of the attachment.

Any pointers to solve this issue will be of great help.

Thanks

Justin

Accepted Solutions (1)

Accepted Solutions (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi,

Plz Refer the following link

http://forums.sdn.sap.com/thread.jspa?threadID=162961&tstart=0

Regards,

Gagandeep

Answers (3)

Answers (3)

Former Member
0 Kudos

there is no standard way so you will have to write module beans.

in other way:

XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping -

Dynamic name in the mail attachment - pseudo "variable substitution" :

0 Kudos

Thanks for all the answers. As mentioned by all of you, there are multiple ways of doing it.

We can write a bean as mentioned [here|http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0SetAttachmentName].

Another simple way is to do as I mentioned in my question. I configured it following this [link|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=138084630].

But it was not working for me and now I found out what was missing. We have to check the ASMA settings for the receiver adapter also while following this configuration. Since that was not set, it was not accepting the settings what we were doing in the mail package.

Thanks for all the replies.

sunilchandra007
Active Contributor
0 Kudos

You need to create custom adapter module that would be used in receiver mail adapter. For module code you can check this [wiki|http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0SetAttachmentName].

Regards,

Sunil Chandra

Former Member
0 Kudos