How do I trigger the new mail toast/alert?

Add-in Express™ Support Service
That's what is more important than anything else

How do I trigger the new mail toast/alert?
 
mat3




Posts: 15
Joined: 2010-05-06
Env: MAPI Store Accessor | VS 2010 | .net 3.5 | Outlook 2007 | VSTO 3

I have an outlook addin that adds a new message type (by inheriting from PostItem). I'd like to trigger the Outlook New Mail Toast/Alert when a new message comes in. Any ideas?
Posted 30 Jun, 2010 23:36:27 Top
Eugene Astafiev


Guest


Hello Matt,

You can intercept the NewMail notification event of MAPI using the http://www.add-in-express.com/products/mapi-store-events.php. Please have a look at the Demo projects folder. In the event handler you can trigger your own event. Does such solution meet your needs?

Can you please specify where a new message comes from? Isn't it created by your code?
Posted 01 Jul, 2010 07:36:06 Top
mat3




Posts: 15
Joined: 2010-05-06
Hi Eugene,
We are creating the new post item programatically by connecting to a non mail server. As a result, the new mail notification event is not getting triggered. Is there any way to trigger the new mail notification if we add a post item?
Thanks

Matt
Posted 01 Jul, 2010 13:16:35 Top
Eugene Astafiev


Guest


Hi Matt,

I am afraid there is no trivial solution. It looks like you need to write your own http://msdn.microsoft.com/en-us/library/cc815283%28v=office.12%29.aspx. Please pay special attention to the http://msdn.microsoft.com/en-us/library/cc842563%28v=office.12%29.aspx method.

BTW Instead, you can handle the OnObjectCreated event of the MAPI Store Accessor.
Posted 02 Jul, 2010 06:38:10 Top
mat3




Posts: 15
Joined: 2010-05-06
Yeah, we could generate our own Oulook "toast" lookalike popup, but I was trying to avoid that and hook into existing Outlook toast system.

Oh well. Thanks a bunch for taking the time!
Posted 02 Jul, 2010 21:47:59 Top