none
NewMailEx RRS feed

  • Question

  • Trying to leverage Outlook 2010 and the NewMailEx event to process a specific email.  In general the event fires and I can process standard MailItems without issue.  

    this.Application.NewMailEx += new Outlook.ApplicationEvents_11_NewMailExEventHandler(Application_NewMailEx);

    My issue is when trying to process Office Communicator 2007 Missed Call notes.  If I use the active explorer code to determine the type, it comes through as MailItem, but when looking at the MessageClass, it's listed as "IPM.Note.Microsoft.Missed.Call".  

    When this notification hits the inbox, it does NOT fire the NewMailEx event.

    Thoughts or advice?

    Wednesday, December 5, 2012 4:02 PM

Answers

  • OCS = Office Communicator.

    I found a solution using the Item_Added event.  That seems to fire when an OCS notification is emailed.

    _items.ItemAdd += new Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(Items_ItemAdd); 

    Thanks for the help everyone.


    • Marked as answer by bobjackson Friday, December 7, 2012 8:20 PM
    Friday, December 7, 2012 8:20 PM

All replies

  • Does it fire the Items.ItemAdd event on the Inbox?

    Can you see the NewMailEx event being fired in OutlookSpy (click Application button on the OutlookSpy toolbar, go to the Events tab)?


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

    Wednesday, December 5, 2012 5:08 PM
  • Yup..confirmed, nothing fires when receiving a missed call email/note.  Again, this is coming from OCS, so not sure if it's treated as a conversation item??
    Thursday, December 6, 2012 1:59 PM
  • Hi bobjackson,

    Thanks for posting in the MSDN Forum.

    What's mean of OCS? There have too many explains for that abbreviation.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 7, 2012 7:27 AM
    Moderator
  • OCS = Office Communicator.

    I found a solution using the Item_Added event.  That seems to fire when an OCS notification is emailed.

    _items.ItemAdd += new Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(Items_ItemAdd); 

    Thanks for the help everyone.


    • Marked as answer by bobjackson Friday, December 7, 2012 8:20 PM
    Friday, December 7, 2012 8:20 PM
  • That makes sense - if the message is simply created in the Inbx folder instead of being delivered by a transport provider, only ItemAdd will fire. NewMail will not.

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

    Friday, December 7, 2012 8:41 PM