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.
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)
Please note that I do not want to use Mail Package option. Thanks in advance!