none
Best Process to process incoming messages. RRS feed

  • Question

  • I have multiple emails that come in at a time ~50.  Does anyone know of a process I can use to identify the sender/name/date of the incoming message i don't want to work with EntryIDs. Remember over 50 messages at a time. I'm trying to code this in VBa.

    Friday, June 29, 2012 4:19 PM

Answers

  • No, if you receive all 50 emails at a time, no events will fire at all - on the low level, MAPI will fire the fnevTableModified/TABLE_CHANGED event (which provides no details about the particular items); and Outlook does not expose that event through its Object Model at all.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    • Marked as answer by soxedace Thursday, July 5, 2012 12:13 PM
    Monday, July 2, 2012 2:36 PM

All replies

  • What's wrong with working with the entry ids retrieved from the Application.NewMailEx event?

    You can also use Items.ItemAdd event on the folder.

    Note that events can be dropped under heavy loads. In case of an Exchange mailbox you also will not receive the events corresponding to the messages received when your code was not running.

    You can just periodically poll the folder in question, especially if it is a dedicated folder that only contains the mesages that your code processes. You can still use an Items.ItemAdd event on the folder to proces the new items mmediately instead of waiting for the timer to fire.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    Friday, June 29, 2012 6:54 PM
  • When i recieve mass ammounts of emails. NewMailEX doesn't run on all the messages it skips some.  Right now what my NewMailEX function moves the messages to a .pst folder, it misses some emails though and just leaves them in the inbox. I have also been testing a NewMailEX function that takes longer time to process and this it leaves even more messeges unprocessed.

    Friday, June 29, 2012 7:08 PM
  • Just as I mentioned, MAPI events can be and are dropped. They shoudl not be used for any kind of synchronization.

    Would my other suggestions work for you?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    Friday, June 29, 2012 7:59 PM
  • Alright.    One questions: can items.itemadd could handle a large amount of emails at the same time. (~50 emails.)  If i recieved all these emails and used rules to move them to a .pst folder and get items.itemadd to run on that .pst folder would that work?

    Monday, July 2, 2012 12:59 PM
  • No, if you receive all 50 emails at a time, no events will fire at all - on the low level, MAPI will fire the fnevTableModified/TABLE_CHANGED event (which provides no details about the particular items); and Outlook does not expose that event through its Object Model at all.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.3 is now available!

    • Marked as answer by soxedace Thursday, July 5, 2012 12:13 PM
    Monday, July 2, 2012 2:36 PM