cancel
Showing results for 
Search instead for 
Did you mean: 

Different attachments in sender mail adapter

Former Member
0 Kudos

Hi all,

i have a requirement like below.

i will get xml or csv attachments in mail . need to fetch different attachments like csv or xml from sender mail and dump all attachments in one folder by using file receiver.

Can you please provide java module code to read different attachments in sender mail adapter.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

It seems that you are not doing any mapping? it's a pass through scenario?

Using payload swap bean -> replace the main payload with the attachment and then transfer the xml/csv file to your receiver file adapter.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi,

thanks for your inputs. will get either multiple xml or multiple csv at a time. will it possible to handle with payload swap bean. if yes, please provide more details.

former_member181985
Active Contributor
0 Kudos

Hi Bhavin,

Go for PayloaodZip bean module with ZipAll option in either in sender mail adapter or receiver file adapter.

Then in file receiver channel use post OS script to extract all file contents

Regards,

Praveen Gujjeti

Former Member
0 Kudos

Hello,

No it's not possible to use payload swap bean for processing multiple attachments...I thought u are getting one attachment at a time.

Anyway, I have gone through some of the discussions and it seems that writing a adapter module is one of the possible way but before that try out Praveen's reply....

https://scn.sap.com/thread/1852948

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Praveen/Amit,

Can you please provide sample code for OS script to extract file contents? or

please provide me module code to read attachments content in mail adapter itself.