cancel
Showing results for 
Search instead for 
Did you mean: 

Zip file attachment

Former Member
0 Kudos

Hello,

we are searching for an answer to the following problem...

We are trying to send an email with an attached file via the email adapter. We are using the mail package format for sending the email. The content of the mail package is converted into an file attachment in the mail adapter. Because we have to define the attachment name we use the MessageTransformationBean to change it.

Now we want to zip the attached file... Can anyone give me a hint, how to realize it? Have we write a module, which we have to call inside the mail adapter? If so, where must we place this module in the EJB sequence?

Thank you for your replies...

Best regards,

Lars

Accepted Solutions (0)

Answers (2)

Answers (2)

sivakup
Explorer
0 Kudos

Hi Lars

I think the only way now is to do some module programming. We did zipping in one of our proof-of-concept application for file adapter with additional attachments. I can send you the code if you need it.

Regards

siva

sivakup@apci.com

Former Member
0 Kudos

Hi Palaniraja,

thank you for your answer...

My question to your suggestion is, can we use it in our case? Because we generate the attached file with the email adapter. I don't know exactly if the file is already send, if we place the module behind the mail adapter EJB. Or must we place it before this EJB. Which step will be the best time to place the new module? Before or after the mail adapter EJB?

It would be great to get the code from your site... Could you please send the code to my EMail address from my Business Card?

Thanks a lot...

Regards,

Lars

stefan_grube
Active Contributor
0 Kudos

> I don't know exactly if the file

> is already send, if we place the module behind the

> mail adapter EJB. Or must we place it before this

> EJB. Which step will be the best time to place the

> new module? Before or after the mail adapter EJB?

The standard module <b>must</b> be the last, no matter if you have sender or receiver adapter.

For example you could have following order:

1. ZIP module

2. MessageTransformationBean

3. Standard mail module

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

thank you for your help! I will try to create my own module for our case and will use the module order you have proposed.

Regards,

Lars

Former Member
0 Kudos

Hi Lars

I am not sure if this suggestion might work, but in your MessageTransformationBean, in the parameter Transform.ContentDisposition try passing "xyz.zip" instead of 'xyz.txt' and see what you get as output.

cheers

Sameer