i'm writing for a addin for Outlook and i'm trying to capture the event of a mail sent from outlook. On thw web i've found a lot of examples for a SEND email, but i need to know the event of an email that was SENT. There is a method or a procedure to hook this particular event? Thanks
1
votes
3 Answers
0
votes
0
votes
i figured a simple cute work around for that, without using add-ins
Just check the MailItem.Sent value after displaying to user, if it's false than you know the email was closed without sending, and if it has no value, meaning you get an error "item was removed or deleted", that means the email was sent and that's why the object disappears
try it
MailItem.Display(True)
Try
Dim sent As Boolean = MailItem.sent
'msg was closed without sending
Catch ex As Exception
'msg was sent
End Try