Re: Generic format for saving EMails



aaronfude@xxxxxxxxx wrote:
We have written a number of java tools for analyzing the contets of an
imap mailbox. What we would like to be able to do is save a particular
email message as a file on our hard drive. Is there a more or less
generic format for doing so and if so, can it be created in java?
(Something like the .eml)

The file should contain all information pertaining to the email (from,
to, subject, content, attatchments, etc.)

Simply saving the message as a text file in the format in which it arrived (RFC 822/2822) is the simplest way. I believe that corresponds to the ".eml" extension used by many email clients.


Or, you could just serialize the Java objects to a file.

Another, fairly venerable (read: old) way of storing emails is the mbox format. http://en.wikipedia.org/wiki/Mbox
.