Synchronization error event

  • Thread starter Thread starter Twotone
  • Start date Start date
T

Twotone

Because I don't want to be interrupted when Outlook is sending and receiving
emails, I have ticked the box to say "don't show me the progress dialog box".

The problem is that, when occasionally emails don't "go", I don't notice and
they sit in my Outbox until I close Outlook, which may be many hours later.

Ideally, therefore, I would like to capture the "synchronization error
event" and make a message appear on my screen. However, I understand that,
despite the fact that the Microsoft help screens imply otherwise, you can
only capture this event when you have initiated the synchronisation from
code. ie it can't be captured for a scheduled or user-initiated
synchronization.

Can anyone confirm if this is correct and if so, how else I might do what I
want to do?

Thanks in advance.
 
That's correct. There are no errors passed to you and no way to know the
start and end of an Outlook initiated send/receive (synch). As far as I know
there's absolutely no way to do what you want.
 
What about using a piece of code that calculates how long a mail has been
sitting in your outbox, and if it is over a specified value (depending upon
how often your send/receive is configured) then launch a messagebox. You can
then use a timer (initiated upon launching Outlook) or something to run this
routine every so often.
 
Although any code that touches the item in Outbox or even handles
Outlook.Items will end up aborting the send on that item. You have to be
real careful of touching items using code that have been submitted to the
mail transport.
 
Thanks for the confirmation and the suggestion.

I think I will programmatically initiate a send/receive myself (ie in
addition to the scheduled ones) every two hours or something. Then I will be
able to use the onerror event to see if any emails haven't gone.

Best regards
 
Back
Top