Author |
|
rodham Newbie
Joined: 15 November 2010
Online Status: Offline Posts: 7
|
Posted: 15 November 2010 at 7:09am | IP Logged
|
|
|
How to get new mail, when mail may be read in another app, clearing the flags Recent and Unseen.
I'm currently storing a last-get-mail datetime value and use the date in a Search with SINCE and then loop thru testing the oEnvelopes.Date against my stored datetime to test the time difference.
To circumvent the differences between datestimes on the seperate email servers I save the newest emails server received date from the last-get-mail routine.
Is there a more elegant ways to retrieve new messages?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 15 November 2010 at 7:34am | IP Logged
|
|
|
You should use UID values to distinguish between old and new emails. Maintain UIDs of emails in your local database. On each session, compare the list of UID of all emails on the server with the list of UIDs of old emails you have in the database. The difference is your new emails. Now you can clear the database for this account and save the current server's list of UIDs to the database (for future session).
regards,
Alex
|
Back to Top |
|
|
rodham Newbie
Joined: 15 November 2010
Online Status: Offline Posts: 7
|
Posted: 15 November 2010 at 7:39am | IP Logged
|
|
|
Thanks Alex,
I originally attempted using UIDs but if a message is move out and back into a folder in say Outlook the UID for the message changes. And would look like a new UID and therefore message to my Mailbee based app.
Any other ideas?
|
Back to Top |
|
|
rodham Newbie
Joined: 15 November 2010
Online Status: Offline Posts: 7
|
Posted: 16 November 2010 at 10:50am | IP Logged
|
|
|
Am I wrong about UIDs and moving messages back and forth between folders or am I using the UIDs wrong. I would much prefer to use the default or best practice for collecting messages.
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 17 November 2010 at 9:16am | IP Logged
|
|
|
If you move the message between folders, UID will change. UIDs are never reused. If you move the message into a folder, it's obviously a new message (even if you moved it from this folder before).
I do not see any problem here.
regards,
Alex
|
Back to Top |
|
|