cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment Processing via receiver File Adapter

Former Member
0 Kudos

Hi All,

We are working on Email -->PI (7.4 single stack)-->File Server (NFS) scenario.

The requirement is to pick the mails from the mail server and store files (Mail + Attachments) at the target file server. The Mail body should be saved as .html file whereas the attachments should be saved as it is.

E.g., A mail with one word document as attachment should result in one .html file and one word document.

The name of the html file is derived from the mail subject and the attachments name is kept as it is.

This scenario is working fine with SFTP adapter and to process the attachments, we are using store attachments options. However, now we need to use File (NFS) instead of SFTP adapter. The problem that we are facing is that there is no option available (such as store attachments) in the receiver FILE adapter.

Request your suggestions on how this can be achieved.

Thanks in advance!

Regards,

Rahul

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member181985
Active Contributor
0 Kudos

Hi,

zip all attachments along with main payload using sap standard payloadzip bean module with mode zipAll either in sender mail adapter (or) receiver file adapter.

Write the zip file to file system. use script to unzip

.If you face issue with attachment names, then alternately you can try with:

//BR,

Praveen Gujjeti

Former Member
0 Kudos

Hi Amit,

Thanks for the reply.

I'm trying the approach as suggested  by you. However,  I'm not able to write the file to File server (NFS). Do you have any sample code for the same?

Thanks,

Rahul

Former Member
0 Kudos

Hello,

Using a UDF, you can extract attachment while doing mapping and save the same on file server. For mail body, u can allow file receiver adapter to do the job for you.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks Amit. It resolved my issue.

Former Member
0 Kudos

Hello,

Did you happen to go through the below threads

BR,

Diptee