> This avoids any problems with Paul's structure, say you receive 3 emails
in the time 
> it takes to download/process and delete them all. Then you've just dumped
3 unread emails.

I'm not quite sure what you mean by this? Could you explain in a bit more
detail?

As I understand various POP servers to work (and I have worked with more
than I care to remember), if I have three mails for instance numbered 1,2
and 3 and I process them all in one go. During that process if three more
arrive, they will be numbered 4,5 and 6. So if the delete function is only
passed the values 1,2 and 3 then 4,5 and 6 will become 1,2 and 3 for the
next time you access the POP account... You don't lose any mail in that way.

The only possible way you could lose mail doing this is if your POP server
re-orders mail with every POP session at which point messages 1,2 and 3
would not be guaranteed to be numbered 1,2 and 3 between your GETALL and
your DELETE calls whether or not messages 4, 5 and 6 arrived at any point in
your processing... If your POP code does process mails one by one and your
POP server re-orders mails in this way (which in my opinion smacks of a poor
POP server implementation), you are increasing the risk that you are going
to process the wrong mail.

As I've already said, the only guaranteed way to delete mail is by using the
UID attribute. Using the UID is slower than messagenumber by nature as it
has to retrieve and parse the UIDs of all the mails in the mailbox to
establish its current message number for deletion as the DELE command only
supports message number deletion at the end of the day.... Deletion by UID
over POP is merely an abstraction superimposed on the POP protocol that
guarantees you always get the correct mail.

Paul


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198467
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to