Does Microsoft Outlook deletes POP3 INBOX folder?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Hategeka
Posted On:   Wednesday, July 31, 2002 03:04 AM

Hi! The following code fetch emails from, the INBOX folder and puts them in the message[] array. ... Properties props = System.getProperties(); session = Session.getDefaultInstance(props, null); store = session.getStore("pop3"); store.connect(host, username, password ); folder = store.getFolder("INBOX"); folder.open(Folder.READ_WRITE); Message message[] = folder.getMessages(); int nbMsg = message.length ; System.out.println(" Number messages = " + nbMsg ) ; ... I have executed the code, and it displayed the number of message   More>>

Hi!

The following code fetch emails from,

the INBOX folder and puts them in

the message[] array.

...

Properties props = System.getProperties();

session = Session.getDefaultInstance(props, null);

store = session.getStore("pop3");

store.connect(host, username, password );

folder = store.getFolder("INBOX");

folder.open(Folder.READ_WRITE);

Message message[] = folder.getMessages();

int nbMsg = message.length ;

System.out.println(" Number messages = " + nbMsg ) ;

...



I have executed the code, and it displayed

the number of messages in the inbox folder:

Number messages = 11



I then open Outlook, checks the inbox folder,

and then close it.

I can see there are 11 unread messages.



After that, when I re-execute the code above,

it displays:

Number messages = 0



the inbox seems to be empty after using Outlook!



Why?



Thanks!    <<Less

Re: Does Microsoft Outlook deletes POP3 INBOX folder?

Posted By:   John_Zukowski  
Posted On:   Saturday, August 3, 2002 07:41 PM

Outlook copies the files off the server and places them on the user's machine.

Re: Does Microsoft Outlook deletes POP3 INBOX folder?

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, July 31, 2002 07:15 AM

Outlook has a user configuration setting, which can "leave mail on the server" for a number of days before deleting it. But it is not the default, so unless the user sets this, messages are removed from the server, once they are downloaded and the POP3 session ends. That's how POP3 is "supposed" to work anyway. POP (POP3 is just the 3rd revision) was designed as a way to get new messages downloaded (and deleted once downloaded) off a remote server. Originally it was, hi I'm the mail server, here's a batch of messages, you download them, and then if you're done downloading successfully, then boom they're gone (the server deletes them whenever it feels like, either right away or whenever, at its convenience). You (the client) got one shot at downloading them, that's all. Any other clients coming along afterwards were out of luck, sorry the messages were already downloaded by the first customer.



The whole "leave messages on server" thing, allowing multiple POP clients to download the same messages, including the "UIDL" mechanism which is then necessary for clients to identify which messages it has read, and which specific messages to delete on the server, was added as an extension, long after the original POP was designed.



For anything more complex than that, for using a remote mail server as a mail store or folder server, where it actually keeps copies of the messages on the server, IMAP was designed instead.

About | Sitemap | Contact