ItemSend event is not firing

◇◆丶佛笑我妖孽 提交于 2019-11-28 09:07:55

问题


I have an Outlook 2007 Add-in (VSTO). Any mail sent with Outlook should be modified before that.

I use the Application.ItemSend event and it works fine if I send an email directly from Outlook (Inspector) or through a custom C# application that uses the Send method of the MailItem.

However, there is some external application that uses Outlook to send mails - which does not trigger the ItemSend event at all. The mail is moved directly to the Outbox (I can even catch the event of ItemAdd on that folder) and then sent.

Another interesting issue is that if I define a deferred delivery rule it works OK if I send a mail with the Inspector or my c# code, but not when this application does it.

My question is when and how can you create a message that passes the ItemSend event?


回答1:


This is by design: messages created and sent by Simple MAPI or mailto url do not trigger OOM events. This is done on purpose - there were some problems in those scenarios, so events were completely disabled.



来源:https://stackoverflow.com/questions/12177345/itemsend-event-is-not-firing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!