cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep same file name in File to Mail-Without Ripository Object??

arijit_mukherjee2
Participant
0 Kudos

Hello Experts,

I have a requirement where I need to pick a file and need to send that as an attachment by mail adapter through PI.

I can send the file as attachment but the file name is being changed.

For example,the source file with name "Vendor_2011_11_06" is being transfered but when I am checking the mail box,the file is coming as attachment but the name has been changed to "Untitled.bin".I want the same file name as it was in source SFTP server.

Do any one have any idea that how can we set the file name at receiver mail adapter?

**Note:I have not created any repository objects,simply configured the ID object with dummy Service Interface name.So no mapping exist.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For example,the source file with name "Vendor_2011_11_06" is being transfered but when I am checking the mail box,the file is coming as attachment but the name has been changed to "Untitled.bin".I want the same file name as it was in source SFTP server.

by using MessageTransformBean you can acheive this.

Transform.ContentDisposition------ attachment or inline For example, attachment;filename=u201Dabc.txtu201D

Transform.ContentDescription------- Description

Transform.ContentType------Specifies the payload type, for example, text/plain

refer this blog

http://wiki.sdn.sap.com/wiki/display/XI/DynamicEmailAttachmentnameforReceivedMails

i hope this will help you.

regards,

ganesh.

arijit_mukherjee2
Participant
0 Kudos

Hi Ganesh,

Thanks a lot for your help.Message Transform Bean is working in case I want a static name.But I want the same name while it was picked by SFTP adapter at source.Do you have any idea that how can we use Meesage TarnsformBean to get the dynamic name of attachment?

I have used the module as below:

Transform.ContentDisposition-->attachment;filename="VendorReport.xml"

Answers (1)

Answers (1)

sunilchandra007
Active Contributor
0 Kudos

The dynamic attachment name can be set using adapter module. Check this [wiki|http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0SetAttachmentName] for more details.

Regards,

Sunil Chandra