Author |
|
live2 Newbie
Joined: 02 November 2008 Location: Austria
Online Status: Offline Posts: 6
|
Posted: 02 November 2008 at 12:39pm | IP Logged
|
|
|
Hello
I have a POP3 Mailbox with many E-Mails. And my Question is. When i DownloadEntireMessages(1,1000) and 10 Seconds later i DeleteMessages(1,1000) and in this Time i received a new mail is the new one of index position 1001 or 1?
Regards
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 03 November 2008 at 5:01am | IP Logged
|
|
|
Usually, POP3 servers keep messages in chronological order, so the message should have index 1001 in your case. But we encountered a server which uses another order.
Also, if there's no disconnect between DownloadEntireMessages(1,1000) and DeleteMessages(1,1000), the new message won't be available in that session. When you connect to a POP3 server, it takes mailbox snapshot which won't change until you disconnect and re-connect again.
In case if deleting messages is performed in another POP3 session (after disconnect/re-connect), it's not safe to delete messages by indexes, especially if there's a possibility of accessing mailbox by other mailers which may delete some messages and shift indexes.
It's recommended to use message UIDs instead of indexes which are safe between different POP3 sessions. Pop3.GetMessageUidFromIndex, Pop3.GetMessageIndexFromUid, Pop3.GetMessageUids methods would be useful to you.
Best regards,
Andrew
|
Back to Top |
|
|