• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using the JAVAMail API offline

 
Ethan Gur
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks, I'll try that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!