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
 

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