开发者

How to detect when a specific mail item has been sent out using c#

开发者 https://www.devze.com 2023-03-13 21:19 出处:网络
I have a problem and need some help. My application uses outlook to send email with attachments. Right now i need to find out when the email with attachment has been send out completely by outlook. I

I have a problem and need some help. My application uses outlook to send email with attachments. Right now i need to find out when the email with attachment has been send out completely by outlook. I tried to follow this link but the ItemEvents_10_SendEventHandler does not fu开发者_开发百科lfil my task as outlook will still be attaching the document when this event is fired. I found out that the email takes time to send out due to the attachment and the duration depends on the attachment size. I want my program to be notified if possible or wait until the email has been send out completely. Can someone guide me or tell me the approach on how to get this to work. Any help provided will be greatly appericiated.


As a stab in the dark, can you not retrieve the item ID from the item events handler, and then check to see when its moved from the Outbox?


I have a solution. Basically i will check the outbox continously for the subject of the email. If it is there continue to check until it is not in outbox. I also have a thread that will stop the checking process if the email is not sent within 5 minutes. Problem solved.

0

精彩评论

暂无评论...
验证码 换一张
取 消