Re: Capture sent e-mails using an Outlook Addin/Extension

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



With help from Dmitry and others in this group I am doing something very
similar using the OnWriteComplete handler of an ECE.You should be aware that
this method is called for reasons other than the submitting of a message to
be sent. For example, it gets called when a copy of a message being composed
is saved to the drafts folder.

I set a named property into the message during the OnSubmit handler. Then I
only save a copy of a message in OnWriteComplete if it has this named
property.

I hope this helps,

Dave Smith

"Dmitry Streblechenko" <dmitry@xxxxxxxxxxx> wrote in message
news:%23O1fO0FgGHA.4776@xxxxxxxxxxxxxxxxxxxxxxx
What eaxctly do you mean by "not all metadata is defined at the point of
the event"?
In you are using ECE, wait for the OnWriteComplete event fire.
If you are using OOM, ItemSend event will have all the properties
populated if you are using OOM, in case of MAPI call MailItem.Save first.

If you mean the sender related props are missing, thee only workaround is
to either wait until the mesage gets to the Sent Items folder or figure
out the sender related props using IMAPISession::QueryIdentity and
IOlkAccoutnManager.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Brian Ross" <brian.ross.x@xxxxxxxxxx> wrote in message
news:u4t9HnFgGHA.3900@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

What is the recommended way to capture all e-mails sent from Outlook
using an Outlook plugin (COM Addin/Exchange Extension)?

The goal is to capture the e-mail and save it to disk. After looking at
the 'ItemSend' (COM Addin) and 'OnSubmit' (Exchange Extension) it seems
like not all metadata is defined at the point of the event. Is there a
better way?

Thanks
Brian





.



Relevant Pages

  • Re: copy of email
    ... You get thee complete message in OnWriteComplete. ... OutlookSpy - Outlook, CDO ... folder or not? ... How can I set my own named property to copy to outgoing e-mails? ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Addres fields missing with cached Exchange mode
    ... No sender info is even supposed to be available when OnSubmitComplete or any ... OutlookSpy - Outlook, CDO ... therefore, the delay until OnWriteComplete. ... cached Exchange mode of Outlook 2003, ...
    (microsoft.public.win32.programmer.messaging)
  • Re: MailItem Save method corrupts TaskRequest item.
    ... You asked why I need to reopen the message via its Entry ID. ... code and avoid the Outlook problem saving task-related items. ... Dave ... > OnWriteComplete is called after all the properties are copied to IMessage ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Cancelling a Task assignment on OnWriteComplete.
    ... embedded IMessage item from the attachment to the Task Request item during ... OnWriteComplete, a call to HrGetOneProp for PR_ENTRYID on this object ... > Outlook does modify the original task. ... >>> message and set my named property on it.The code appears to work. ...
    (microsoft.public.win32.programmer.messaging)