• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Email zip attachments

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a requirement to send emails with zip attachments. I have to extract the data from the database, zip it and then email it. The problem is that I'm trying to do this without actually writing a zip file on the local system. If I attach it as a zip file I have no problem. I've searched high and low for examples but not found any. Is there any technical limitation that precludes this solution? Any ideas , anyone?
I'm using the Java Mail Api for emailing and the java.util.zip package for zipping.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To attach the zip file, you will need to provide the file path (to your physical zip file) to the javamail. If you don't have physical file then how can you even attach it?

but then if you don't want the zip file after emailing, you can always call a method to delete the zip file on your local machine.
 
reply
    Bookmark Topic Watch Topic
  • New Topic