Saving the mail in sent items without actually sending the mail.

J

Joe

Hi all

i would like to save a copy of a dummy mail which i create in code to
the SentItems folder. i dont want to actually send it. i saw it
working in the LinkedIn Toolbar for outlook while sending invitations
to contacts. They dont sent the mail using outlook rather some web
service but they manage to save a copy into sent items folder. How do
i reproduce something like this. Any sample code or link would be
greatly appreciated.

thanks

Joe Augustine
 
M

Mark J. McGinty

Joe said:
Hi all

i would like to save a copy of a dummy mail which i create in code to
the SentItems folder. i dont want to actually send it. i saw it
working in the LinkedIn Toolbar for outlook while sending invitations
to contacts. They dont sent the mail using outlook rather some web
service but they manage to save a copy into sent items folder. How do
i reproduce something like this. Any sample code or link would be
greatly appreciated.

Get a reference to the Sent Items MAPIFolder object (GetDefaultFolder method
of NameSpace object, olFolderSentMail as the argument value), then get a
reference to the Items collection (property of MAPIFolder) and use its Add
method to create the email item directly in Sent Items. Or if the item
already exists in another folder, call the item object's Copy or Move method
(both of which accept the destination MAPIFolder as an argument.)


-Mark
 

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