How to get an email during the send process?

S

sublimese

I am making an Outlook addin. The addin must work with Outlook 2003
and Outlook 2007. One of the requirements of the addin is that after
a user sends an email, I must make a copy of it and place that copy
into a specific folder in the public folder tree.

I know how to copy an item, and I know how to place an item into the
public folder tree.

What I have not found a way to solve is how to get a copy of an email
AFTER it is sent. When I make a copy of the email, that emails "Sent"
property must be "TRUE" and its "SentOn" property must be populated
with the correct time.

Unfortunately all the events I have attempted to hook all happen
BEFORE the email is sent. I have tried to hook the Item_Send event,
various outbox events, I looked into the "Send/Receive" group events
with no luck. The closest I have come is hooking the item_add event
on the "Sent" folder. While this would certainly fulfill the
requirements of getting the email after it was sent, the issue with
that a user can choose weather or not sent email items go into the
"Sent" folder. A user can set this as an outlook wide option, and can
also set it on an item by item basis.

I need something that will reliably allow me to get a copy of an email
after the email has gone through the sending process.

Thank you
 
H

Helmut Obertanner

Hello Sublimese,

you can monitor the sentItems folder for the Items.Add event.
everytimes an email is sent it goes to the sent items folder of the sender.

But as I know you can archive that functionality also with a rule at the
Client.
If it's for 1 Client only - maybe better use a rule, if it's for multiple
clients - better use an addin.

Here I would recommend an COM addin, not a VSTO.

Hope this helps,
greets, Helmut
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top