Menu

null fields in messages

Help
2011-08-25
2013-05-01
  • Brian Young

    Brian Young - 2011-08-25

    Hello,

    I've been able to use mstor to access Thunderbird folders and the messages they contain.  However, the Message objects I get back are very sparsely populated…. subject, recipients, etc. are all null.  The only thing that actually returns data is getContent(), which is a String containing the body of the email.

    I'm probably missing something obvious, I could post the code if it would help but really it is basically tutorial/hello world level javamail code.

    Thanks in advance!

     
  • Anonymous

    Anonymous - 2011-09-16

    I'm getting exactly the same problem. So, I don't have an answer, but you're not alone!

     
  • Anonymous

    Anonymous - 2011-09-16

    For what it's worth, there are lots of really bad things happening in this code. After I finally found it, I looked around, and this is sloppy stuff. I finally gave up trying to figure out how to trick the configuration into functioning, but this library will certainly never work for me, based on assumptions I found in the code that are not required by rfc 822, and which do not hold true in my data.

    *sigh* Oh well.

     
  • Ben Fortuna

    Ben Fortuna - 2011-09-17

    Oh the injustice of someone making available a library (for FREE!) that doesn't meet your needs. I think you may need to take another look at the license..

    Brian, mstor still works with the sample mbox files in the tests, so it's possible something has changed in the Thunderbird mbox format. I will try to find some time to install Thunderbird and do some tests on it.

    Oh and there is no RFC for mbox, it's an unofficial file format that has many different implementations, so really we need to test against every implementation to see if they are doing something a bit different.

    regards,
    ben

     
  • Brian Young

    Brian Young - 2011-10-10

    Thanks Ben,

    I think I narrowed down the problem to missing libraries.  Out of the box, a lot of jars seem to be required that one might think would not be required for simple MBOX access… and no runtime exceptions are experienced when you leave them out- but it definitely causes problems.  In the end I just punted and included all the jars for now but would still like to circle back on this at some point.

    Thanks a lot for mstor… there is no other solution that I am aware of in Java for accessing a Thunderbird mailbox so I'm thankful for your efforts!

     
  • Ben Fortuna

    Ben Fortuna - 2011-10-11

    Apologies for all the superfluous jars, you don't really need all of them it's just Maven added all the transitive dependencies to the release archive. I will try to clean this up in the future.

    I think the commons libraries (lang, io, logging, etc.) and possibly ehcache and jdom should be enough, but they may have their own dependencies also (e.g. backport-util-concurrent for ehcache). You can safely exclude the jcr/jackrabbit libraries at least, they aren't required for mbox support.

    regards,
    ben

     
  • Anonymous

    Anonymous - 2012-06-14

    Hey,

    Is there any chance you could confirm which libraries are (not) required for accessing mbox files? I'm coming across the same issue as in the OP.

    Thanks,
    Peter

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.