cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver Mail adapter: Attachment with same name as input file WITHOUT using Mail Package

former_member440061
Participant

Hello Experts,

I have gone through many scn threads on this topics and tried a few but I am not able to retain the file name to the attachment in Mail receiver adapter. I went through the below blog and tried scenario 1)..but not getting the file name even after following all the steps. Thats because the content disposition and description are NOT getting changed in the SOAP envelope.

https://blogs.sap.com/2016/03/10/stop-using-mail-package-simplify-your-mail-receiver-adapter-scenari...

I then tried using Java code in the mapping with dummy structure from below discussion:

https://answers.sap.com/questions/11428582/file-to-mail-receiver-with-attachment-without-mapp.html

But still the attachment comes with name "MainDocument.xml". This code only changes the Content-type which shows file name being properly updated by the java mapping. The Content-Disposition and Content-Description headers still show "MainDocument.xml".

Is there a way we can set these parameters(in addition to content type) using java methods?

Details are given below:

Sender adapter: File(NFS)| ASMA:checked | FileName under ASMA: checked

Receiver adapter: Mail

- Message protocol: XIPAYLOAD

- Use Mail Package: Unchecked

- Keep Attachments: checked

- ASMA : checked

- Variable Transport Binding : Unchecked

- All standard settings in Module tab.

ESR: Java Code(attached)

javacode.png

Please note that I do not want to use Mail Package option. Thanks in advance!

former_member440061
Participant
0 Kudos

Hi All,

Any thoughts on this?

Accepted Solutions (0)

Answers (0)