Exemple #1
0
        protected bool UpdateRecipients(MessageItem message)
        {
            bool flag = false;

            MessageEventHandler.ClearRecipients(message, new RecipientItemType[0]);
            flag |= this.AddMessageRecipients(message.Recipients, RecipientItemType.To, "To");
            flag |= this.AddMessageRecipients(message.Recipients, RecipientItemType.Cc, "Cc");
            return(flag | this.AddMessageRecipients(message.Recipients, RecipientItemType.Bcc, "Bcc"));
        }
 private void ClearMessagePropertiesForMimeImport(MessageItem item)
 {
     if (item.AttachmentCollection != null && item.AttachmentCollection.Count > 0)
     {
         item.AttachmentCollection.RemoveAll();
     }
     ItemUtility.SetItemBody(item, BodyFormat.TextPlain, string.Empty);
     MessageEventHandler.ClearRecipients(item, new RecipientItemType[0]);
     item.Sensitivity                = Sensitivity.Normal;
     item.Importance                 = Microsoft.Exchange.Data.Storage.Importance.Normal;
     item.IsReadReceiptRequested     = false;
     item.IsDeliveryReceiptRequested = false;
     item.DeleteProperties(new PropertyDefinition[]
     {
         ItemSchema.IconIndex
     });
 }