Search code examples
javaemailthunderbird

Processing and storing emails in a database


I have lot of emails coming to my email client, Mozilla Thunderbird.

What I intend to do is write a Java program to process all those emails and store them in a database.

I need to know if this is possible? If yes, then it will be very helpful to get some tips on how to go about this.


Solution

  • Sure. Use JavaMail (or more easily, any of many mail wrapping libraries, like Commons Mail, or whatever) to connect to your mail server. Grab the emails. Put them in a database using whatever DB methodology you prefer. It'd likely be far, far more useful if you indexed them in interesting ways using Lucene, though.