How to verify if a file is an email in RFC 822 format?
843830May 10 2006 — edited May 12 2006Hi,
We are working on a project that need to parse RFC 822 emails from a directory and extract email headers and body text and so on...
It is quite possible to have any non-RFC file to be present in that directory. For instance - *.zip, *.tar, *.Pdf, *.dat ... If such files are huge in size (say in GBs) then the application goes 'out-of-memory', the moment it tries to create a MimeMessage for the file using InputStream.
Is there any mechanism, that will help us check if the file being parsed is an email in RFC 822 format?
Any help in this regard will be very much appreciated.
Thanks,
dsunkers