View Single Post
  #2  
Old September 26th 07, 04:47 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Direction/Help required for not to save MailItems in Sent Folder

After cancelling the send you would have to save the item to make sure it
has an EntryID, then close the item after storing the EntryID and get the
item as a new item using NameSpace.GetItemFromID(), then use the Move method
to move it to Sent Items. Note that the item will not show up as sent, it
will be an unsent message.

Set the DeleteAfterSubmit property on each of the items that you don't want
put in Sent Items.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"PS" wrote in message
ups.com...
Hi

I am currently working on an Outlook addin devloped using C# and VSTO
2005. In the MailItem_ItemSend - all my custom logic takes place.

So the scenario i have is once i get the mailitem here - i do some
processing here (like based on the number of recicps) - I create copy
of orig emails (each having one recip) and then those emails actually
go out. The original email which the sender had clicked to send
does(should) not go out.

The problem(s) I am facing is a

1. How do I move the original email to Sent Items folder of the Sender
(so that the sender can refer the email again in its entirity for
future purposes)

2. I dont want the copies of email generated programatically to be
seen in Sent Items folder of the sender. How do i stop that from
happening.

Please - any help/direcction in this regard would really be helpful.

Thanks


Ads