Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: DownloadEntireMessages and DeleteMessages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
live2
Newbie
Newbie


Joined: 02 November 2008
Location: Austria
Online Status: Offline
Posts: 6
Posted: 02 November 2008 at 12:39pm | IP Logged Quote live2

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 View live2's Profile Search for other posts by live2
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 03 November 2008 at 5:01am | IP Logged Quote Andrew

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 View Andrew's Profile Search for other posts by Andrew
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide