cancel
Showing results for 
Search instead for 
Did you mean: 

Mail (attachment) to File with same attachment name

Former Member
0 Kudos

Dears,

I have following scenarios on Mail Adapter.

Mail to File

Requirement 1: PI has to read the un-read emails from a Mail box and pick the attached .PDF files from the emails and move the PDF files to a FTP server with the same name of the PDF. - Mails will have always .PDF files...

Requirement 2: Some mails will have multiple .PDF files, Then PI has pick all the attached PDF files and place it on FTP with the same names.

It would be thankfull if anyone of expert will help me to implement the above 2 requirements...

Thanks in well advance.

Regards,
Rams...

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Rams,

For scenario 1 please refer the below blog

refer the below blog for multiple attachment

regards,

Harish

Former Member
0 Kudos

Thanks Harish for the blogs,

For the Requirement 1, I have used the blog but the sender channel is failing currently with the below error message

"exception caught during processing mail message; java.net.SocketException: Network is unreachable: connect"

For the Requirement 2: The mentioned blog is not equal to the requirement. It is same like Req 1 however multiple attachments (.PDF files) will be there on each mail and PI has to pick them and post them on FTP.

Could you please check and help me if you have any idea on above 2 points?

Thanks-

Ramesh

Answers (1)

Answers (1)

former_member181985
Active Contributor
0 Kudos

Hi,

Two approaches,

1. Use standard SAP payloadzipbean module with zipAll as module parameter value for zip.mode param. Use some script to unzip on FTP server. 

SAP help: Adding PayloadZipBean in the Module Processor - SAP NetWeaver Process Integration - SAP Library

2. In case with option1 payloadzipbean solution , if you are not getting desired pdf file names, then use my article to zip attachments in (java) mapping and write it to output stream instead of creating a new attachment:

Use some script to unzip on FTP server

Regards,

Praveen Gujjeti