cancel
Showing results for 
Search instead for 
Did you mean: 

Mail to File Scenario in PI 7.1 with multiple attachments

Former Member
0 Kudos

Dears,

I would like to start with new a requirement on Mail to File scenario using PI 7.1, the tricky point is here to pick all the attached files (.txt/.pdf) from the emails and place them on a network folder.

I planning to pick the all attachments from email by zipping (using PayloadSwapBean) and placing them on network folder. Can anyone could help me how to use the PayloadSwapBean here to achieve this solution?

If you have any alternative methods please let me know....

Thanks-

Ramesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rams,

I think,

This link may help you.

former_member181985
Active Contributor
0 Kudos

Hi Rams,

You could zip all attachments using a java mapping and write the zip content to outputstream (TransformationOutput) for receiver file channel to handle. Use some script to unzip

You can use my article: . But instead of creating a new attachment you can write that zip content to outputstream

Regards,

Praveen Gujjeti

Former Member
0 Kudos

Thanks for that Praveen,

As per your below comments, i would like to use Payloadswapbean

"The zipping/unzipping of attachments can also be achieved at adapter level using PayloadZipBean module."

Could you please guide me to use the PayloadSwapBean to zip the attachments from email and place them on network folder?

Regards,

Ramesh.

former_member181985
Active Contributor
0 Kudos

Hi Rams,

I am bit uncertain if you can get the right attachments names in the zip file with PayloadZipBean module. May be you can give a try

For payloadswap bean usage you can check, Michal Krawczyk

Best Regards,

Praveen Gujjeti

former_member184681
Active Contributor
0 Kudos

Hi Ramesh,

Your scenario can be achieved if you use the following order of adapter modules:

1. PayloadSwapBean as described here or in Michal Krawczyk's blog linked by

2. PayloadZipBean as described here
3. Execute adapter itself

If you need to maintain the input file names, I believe this can be done similarily as described in this blog: by Praveen Gujjeti.

Regards,

Grzegorz

Former Member
0 Kudos

You are right Praveen,

I have used PayloadZipBean, it zipped all the attachments and placed on network folder, however when i open the zip file the file names were changed (like Mailattachment-1, MailAttachment-2 and Mailmessage).

No, my client doesn't want like this. We have to have the same attachment names with types.

Could you please suggest me in this case?

Thanks-
Ramesh.

former_member181985
Active Contributor
0 Kudos

Sorry Rams I was bit busy. Grzegorz Glowack

already answered your questions

//BR,

Praveen Gujjeti