sending a zip attachment via email.....!_NEWLINE_!without using FileOutputStream
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   r_devserver
Posted On:   Wednesday, November 28, 2001 05:44 PM

I have the code to zip a file, I have the code to mail a file, infact it works great...but I would like to know how do I zip a file(s) with out doing this: ZipOutputStream outStream = new ZipOutputStream (new FileOutputStream("out.zip")); I have the code to attache the email, infact it sends the email when I create the file by: ByteArrayOutputStream bout=new ByteArrayOutputStream(); ZipOutputStream zout=new ZipOutputStream(bout); but the archive is invalid in the end I cannot extract it when I mail it out or try ans write it to disk... any help would be greatly apprieciated... Rob    More>>

I have the code to zip a file, I have the code to mail a file, infact it works great...but I would like to know how do I zip a file(s) with out doing this:


ZipOutputStream outStream =
new ZipOutputStream (new FileOutputStream("out.zip"));



I have the code to attache the email, infact it sends the email when I create the file by:



ByteArrayOutputStream bout=new ByteArrayOutputStream();

ZipOutputStream zout=new ZipOutputStream(bout);



but the archive is invalid in the end I cannot extract it when I mail it out or try ans write it to disk...

any help would be greatly apprieciated...

Rob    <<Less

Re: sending a zip attachment via email.....!_NEWLINE_!without using FileOutputStream

Posted By:   John_Zukowski  
Posted On:   Thursday, November 29, 2001 12:45 AM

You need to encode the content so that it is 7-bit safe.
About | Sitemap | Contact