• 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

JavaMail: MIMEMessages from E-mails on disk?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I have folders of archived E-mails saved to disk that I need to sort through. I would like to use JavaMail to create MIMEMessages from the saved mails, then get at the headers, recipient, contents and so on. The problem is that I don't know how to create MIMEMessages from an InputStream without having a valid Session and/or Folder, and that appears to require the URL of a valid E-mail server. Is it possible to create a Session that represents a set of locally stored E-mails, and not a live mail server, which I could then use to create my MIMEMessages? Alternately, can anyone recommend a simple way of getting at the MIME information (including attachments) in my files?

As always, any help would be very greatly appreciated.
Thank you,
Ed Beaty
 
Ed Beaty
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did some searching, and found a possible solution. It appears to generate a "null session" which does not require a live E-mail server to read mails from an input stream:



Comments? Is there a better/safer/more efficient way to do this?
Thanks,
Ed
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic