Remove unsafe attachment

L

Legoman

Hello,

With an C# add-in, I try (unsuccessfully) to remove attachment that are
considered unsafe by Outlook before sending them.

private void Application_ItemSend(object Item, ref bool Cancel)
{
for (int Count = MailItem.Attachments.Count; Count > 0; Count--)
{
MailItem.Attachments[Count].Delete();
}
}

The collection is empty, but the unsafe attachments are still there when
sending.

I also tried to delete them after saving the message before sending.

Any idea?

Legoman
 
Top