on 10-27-2014 7:41 AM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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 Praveen Gujjeti
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
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.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.