Catching emails in Exchange when Outlook is closed RRS feed

  • Question

  • Hello. 

    I want to process all the emails I've received in Exchange when Outlook was closed. 

    I need to catch all of emails before Outlook is started, so when Outlook opens I can process all of the emails before they hit the Inbox. 

    I am currently using the NewMailEx event and it's not working quite like I expected (e.g. on the first start up, emails arrive and the event isn't even fired). 

    If there is nothing in the Outlook Object Model, I am also wrapping the stores via RDO. 

    Any clues to fix this? 


    Friday, April 10, 2015 3:51 AM


  • NewMailEx  will not fire for the messages received by your Exchange mailbox when Outlook was not running.

    You can either use Items.ItemAdd event on the Inbox folder (it will fire as the new messages are downloaded from the online mailbox) or you can process all unread messages in the Inbox on startup using Items.Find/FindNext or Items.Restrict in case of an online store

    Since you are using RDO, you can also use the Incremental Change Synchronization API exposed by the RDOFolderSynchronizer object.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, April 10, 2015 4:21 AM

All replies