• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Using the JAVAMail API offline

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm working on an application server that uses mail servers via the JAVAMail API.
I want to add a cache mechanism for messages, that can store (in memory / filesystem / DB) messages that were already read by the user. Can I use the JAVAMail API when not connected to the mail storage?

Thanks
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Can I use the JAVAMail API when not connected to the mail storage


No. Well, you can't use any of its features when not connected to a server. However, you could write a program which periodically connects to the server to get any new messages.
 
Ethan Gur
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, but I don't see how it helps.
I don't need to cache new messages, I need to cache already seen messages.

I thought about extending the Message class, and simply imitate its functionality by saving the actual content as byte[]. But this seems to be very complicated, as this causes me to re-write all of the JAVAMail API without the mail store part... ;-)
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that's your only rtoute I'm afraid. You might want to hunt around places like sourceforge to see if someone has not already written this. Sounds like something that someone might have.
 
Ethan Gur
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I'll try that.
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic