JavaMail POP3 folder.close() method close also store!

Discussion in 'Java' started by Daniel Albisser, Apr 7, 2004.

  1. Hi @ll,

    I was wondering why I lose the connection to the mail store while retrieving information from it
    without
    calling the method store.close()! At the end I found out that the method folder.close(boolean) also
    close the store!

    Following you see the debug log of the JavaMail API:

    > C: QUIT
    > S: +OK POP3 server closing connection


    I really have to keep the connection alive to the server to get all messages at once from the mail
    store. But after closing the folder my client is disconnected :eek:(

    From my point of view it is not very correct that the API close the connection to the store in the
    background
    that my program has implicity opened before! I expect that the connection is alive as long I
    implicity call
    the method store.close()!

    Is there a workaround or a patch that the store won't be closed by calling the method
    folder.close(boolean)???

    Thanks for helping!
    Greetz,
    Dan

    --
    NOTE:
    To contact me directly remove "spam." from the email address.
     
    Daniel Albisser, Apr 7, 2004
    #1
    1. Advertising

  2. Daniel Albisser

    GaryM Guest

    "Daniel Albisser" <> wrote in
    news:1081347967.156162@ftpgate:

    >
    > I really have to keep the connection alive to the server to get
    > all messages at once from the mail store. But after closing the
    > folder my client is disconnected :eek:(


    POP3 only supports "INBOX" as a folder, so once you have done your
    thing with it and closed it there is little else you can do with
    the connection. This may have been the assumption of the author,
    becuase there is no concept in POP3 of a "closed" folder, or any
    kind of folder for that matter.

    http://java.sun.com/products/javamail/1.3/docs/javadocs/com/sun/mail/pop3/POP3Folder.html
     
    GaryM, Apr 7, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vijay
    Replies:
    1
    Views:
    660
    Daniel
    May 13, 2005
  2. Charter
    Replies:
    2
    Views:
    37,484
    Roedy Green
    Sep 20, 2005
  3. Adam Messer
    Replies:
    0
    Views:
    1,497
    Adam Messer
    Sep 20, 2005
  4. cipher
    Replies:
    2
    Views:
    4,323
    Nigel Wade
    Feb 14, 2006
  5. Nikhil
    Replies:
    4
    Views:
    1,000
    Martin Gregorie
    Apr 15, 2007
Loading...

Share This Page