Search The ForumSearch   RegisterRegister  LoginLogin

MailBee Objects

 AfterLogic Forum : MailBee Objects
Subject Topic: Get new mail by date vs (RECENT UNSEEN) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rodham
Newbie
Newbie


Joined: 15 November 2010
Online Status: Offline
Posts: 7
Posted: 15 November 2010 at 7:09am | IP Logged Quote rodham

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 View rodham's Profile Search for other posts by rodham
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 15 November 2010 at 7:34am | IP Logged Quote Alex

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


Joined: 15 November 2010
Online Status: Offline
Posts: 7
Posted: 15 November 2010 at 7:39am | IP Logged Quote rodham

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


Joined: 15 November 2010
Online Status: Offline
Posts: 7
Posted: 16 November 2010 at 10:50am | IP Logged Quote rodham

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 View rodham's Profile Search for other posts by rodham
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 17 November 2010 at 9:16am | IP Logged Quote Alex

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

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