Menu

Only see first message

Help
2005-01-25
2013-05-01
  • Steven Waldren

    Steven Waldren - 2005-01-25

    Hello.  First let me thank fortuna and other developers for making mstor!

    I have just started to explore mstor.  I have a Mac and use Entourage to export mbox files.  I used the sample in the documentation to open the mbox file.  I can open the folder but when I call "inbox.getMessages()"  it will only retrieve the first message.

    Any thoughts on why it would not see the remaining messages?

    Thanks for any help,

    Steven

     
    • Ben Fortuna

      Ben Fortuna - 2005-01-27

      Hi Steven,

      I must confess that I haven't actually tested mstor on a Mac at this stage, although I'm not aware of any reason why it shouldn't work.

      If possible, can you download the source version of mstor and try running the JUnit tests that come with the source code (in the "test" folder). You will need to modify the test cases to run with a local mbox file, but this shouldn't be too hard. I would suggest trying the MboxFileTest test case first. Feel free to email me any results, logs, stack traces, etc.

      Hopefully I'll get a little Mac test machine sometime soon so I can provide better support for the Mac platform (the Mac Mini looks nice!).

      regards,
      ben

      ps. You are very welcome! :)

       
    • Kristian Rink

      Kristian Rink - 2005-06-13

      Hi all;

      first of all, I have to second what Steven wrote - it's a good thing having something like mstor around; thanks to all who made it possible.

      Anyhow, unfortunately I also share the problem regarding mstor seeing only the "first" message. Then again, I don't think mstor only "sees" the first message; I used it to access quite a huge mbox file and getMessageCount() successfully returned the correct number of mails in that folder. Doing something like

      ...
      curidx=folder.getMessageCount()
      Message msg=folder.getMessage(curidx);
      System.out.println(msg.getSubject());
      ...

      also works, but, no matter what value "curidx" does have, the subject printed out always is the subject of the first message in that mbox (it doesn't work this way, however, for curidx=0 or curidx > getMessageCount()).

      System environment:
      Debian GNU/Linux sid (unstable)
      JDK 1.5.0_01
      javamail 1.3.2
      mstor 0.9.5

      I'll also try to get the source version and see what happens, but just for the records - I've seen the same problem on a platform that's not Mac. :o

      Cheers,
      Kris

       
      • Ben Fortuna

        Ben Fortuna - 2005-06-13

        Hi Kristian,

        Thanks for the feedback.

        I've just got access to a Mac for a few weeks so I will try testing in this environment myself. Still, if you could try the unit tests in your Linux environment that would also be appreciated.

        regards,
        ben

         
    • Kristian Rink

      Kristian Rink - 2005-06-15

      Hi Ben;

      and at first thanks for your comment. I just ran the junit tests across the mstor source, using a temporary mbox file which just contains 4 (spam) messages. I cut a few things to make the junit dump a little shorter but basically it seems that mstor, though getting the count of messages right, always tries to access the first message (even though always returning various amounts of data from the current message)... Can you make something of this?

      run-tests:
          [junit] Running net.fortuna.mstor.data.MboxFileTest
          [junit] - Message count: 4
          [junit] - Message [0]
          [junit] =================
          [junit] From - Wed Jun 15 07:26:45 2005
          [junit] X-Account-Key: account1
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
      .......
          [junit] Received: from groundwork-thoh.prgl.net (HELO britches-mlus.net)
          [junit]     by vietnam-ext.zcdap.net (8.9.0)
          [junit]     with ESMTP id HMN12kxer;
          [junit]     Wed, 15 Jun 2005 09:50:42 +0500
          [junit] Date: Wed, 15 Jun 2005 10:51:42 +0600
          [junit] From: "Sandy Butcher" <elvira@emailaccount.com>
          [junit] Message-ID: <101.53e558d5.2a9THI44@ego.com>
          [junit] To: kristian@zimmer428.net
          [junit] Subject: Your low mortage rate
          [junit] X-Mailer: KMail [version 1.0.28]
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
          [junit] Status: U

          [junit] Hello,

          [junit]  We tried contacting you awhile ago about your low interest morta(ge rate.
      .......
          [junit]  To get a free, no obli,gation consultation click below:

          [junit]  http://www.sllly.com/signs.asp

          [junit]  Best Regards,

          [junit]  Melba Heard
          [junit] 
          [junit]  to be remov(ed:    http://www.sllly.com/deletion.asp

          [junit]  this process takes one week, so please be patient. we do our
          [junit]  best to take your email/s off but you have to fill out a rem/ove
          [junit]  or else you will continue to recieve email/s.

          [junit] - Message [1]
          [junit] =================
          [junit] From - Wed Jun 15 07:26:45 2005
          [junit] X-Account-Key: account1
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
      .......
          [junit] Received: from groundwork-thoh.prgl.net (HELO britches-mlus.net)
          [junit]     by vietnam-ext.zcdap.net (8.9.0)
          [junit]     with ESMTP id HMN12kxer;
          [junit]     Wed, 15 Jun 2005 09:50:42 +0500
          [junit] Date: Wed, 15 Jun 2005 10:51:42 +0600
          [junit] From: "Sandy Butcher" <elvira@emailaccount.com>
          [junit] Message-ID: <101.53e558d5.2a9THI44@ego.com>
          [junit] To: kristian@zimmer428.net
          [junit] Subject: Your low mortage rate
          [junit] X-Mailer: KMail [version 1.0.28]
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
          [junit] Status: U

          [junit] Hello,

          [junit]  We tried contacting you awhile ago about your low interest morta(ge rate.
      .......
          [junit]  To get a free, no obli,gation consultation click below:

          [junit]  http://www.sllly.com/signs.asp

          [junit]  Best Regards,

          [junit]  Melba Heard
          [junit] 
          [junit]  to be remov(ed:    http://www.sllly.com/deletion.asp

          [junit]  this process takes one week, so please be patient. we do our
          [junit]  best to take your email/s off but you have to fill out a rem/ove
          [junit]  or else y
          [junit] - Message [2]
          [junit] =================
          [junit] From - Wed Jun 15 07:26:45 2005
          [junit] X-Account-Key: account1
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
      .......
          [junit] Received: from groundwork-thoh.prgl.net (HELO britches-mlus.net)
          [junit]     by vietnam-ext.zcdap.net (8.9.0)
          [junit]     with ESMTP id HMN12kxer;
          [junit]     Wed, 15 Jun 2005 09:50:42 +0500
          [junit] Date: Wed, 15 Jun 2005 10:51:42 +0600
          [junit] From: "Sandy Butcher" <elvira@emailaccount.com>
          [junit] Message-ID: <101.53e558d5.2a9THI44@ego.com>
          [junit] To: kristian@zimmer428.net
          [junit] Subject: Your low mortage rate
          [junit] X-Mailer: KMail [version 1.0.28]
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
          [junit] Status: U

          [junit] Hello,

          [junit]  We tried contacting you awhile ago about your low interest morta(ge rate.
      .......
          [junit] 
          [junit]  To get a free
          [junit] - Message [3]
          [junit] =================
          [junit] From - Wed Jun 15 07:26:45 2005
          [junit] X-Account-Key: account1
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
      .......
          [junit] Received: from groundwork-thoh.prgl.net (HELO britches-mlus.net)
          [junit]     by vietnam-ext.zcdap.net (8.9.0)
          [junit]     with ESMTP id HMN12kxer;
          [junit]     Wed, 15 Jun 2005 09:50:42 +0500
          [junit] Date: Wed, 15 Jun 2005 10:51:42 +0600
          [junit] From: "Sandy Butcher" <elvira@emailaccount.com>
          [junit] Message-ID: <101.53e558d5.2a9THI44@ego.com>
          [junit] To: kristian@zimmer428.net
          [junit] Subject: Your low mortage rate
          [junit] X-Mailer: KMail [version 1.0.28]
          [junit] X-UIDL: j1m!!&(J!!mUT!!T?0"!
          [junit] Status: U

          [junit] Hello,

          [junit]  We tried contacting you awhile ago about your low interest morta(ge rate.
      .......
          [junit]  To get a free, no obli,gation consultation click below:

          [junit]  http://www.sllly.com/signs.asp

          [junit]  Best Regards,

          [junit]  Melba Heard
          [junit] 
          [junit]  to be remov(ed:    http://www.sllly.com/deletion.asp

          [junit]  this process takes one week, so please be patient. we do our
          [junit]  best to take your email/s off but you have to fill out a rem/ove
          [junit]  or else you will continue to recieve email/s.

          [junit] From - Wed Jun 15 08:23:4
          [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 2,626 sec

      BUILD SUCCESSFUL
      Total time: 26 seconds

       
      • Ben Fortuna

        Ben Fortuna - 2005-06-16

        Hi guys,

        I've just found the source of the problem, and it was nothing to do with being on a Mac/Linux. Its basically a copy/paste typo that slipped through in the last release, rendering 0.9.5 essentially useless. I'll be releasing a fix very soon.

        Thanks for your patience.

        regards,
        ben

         

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.