Pocket outlook - synchronize email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
I'm developing a windows mobile 5 application, with C# 2.0, that manages
Pocket Outlook.
This application must automatically synchronize the emails to a server, and
for doing it I've used this method with a suitable parameter:

Microsoft.WindowsMobile.PocketOutlook.MessagingApplication.Synchronize();

Now my question is: how can I know when the synchronization is finished?
I haven't found any events or properties that give me this information.

Many thanks!
mauro
 
Take a look at the State & Notification Broker. In particular, you will want
to hook up an event to the SystemProperty.ActiveSyncStatus property

--Neil
--
Neil Cowburn
Principal Partner
OpenNETCF Consulting, LLC.

http://www.opennetcf.com/
 
Sorry, my information wasn't complete.
I must synchronize emails with a pop server, so using a GPRS connection, and
not using ActiveSync. Can I use the ActiveSynchStatus property anyway?

Thanks,
mauro
 
No, that will only reflect the synchronization of an ActiveSync (or exchange
server) account. There isn't an equivalent property for pop/imap accounts,
nor is there a synchronous version of this Synchronize method sadly.

Peter
 
ok...
I'm searching if there are any unmanaged functions or properties that can
help me...

Thanks!
mauro
 
The closest thing I can suggest is to look at the MessagingOtherEmailUnread
property of the managed SystemState class. By monitoring this event you will
be able to tell when this value changes, which may be because of
synchronisation completing, but may also change when the user views an
existing unread mail causing it to be marked as read. Also of course it
won't signal when it completes a sync but there are no new messages.

Peter
 
a bit of a hack, but couldn't your application (or a related service) act
like a proxy with a socket listening for the connection from the mail app,
then forwarding it on to the appropriate mail server? You would then be able
to follow along with exactly what was happening with the connection to the
mail server.

An example of one way to have email accounts configured so the 'proxy'
doesn't need to be configured with mail server details is in the setup for
Popfile - a bayesian spam filter.

Steven
 
Back
Top