dialog comes up when trying to access mailItem

  • Thread starter Thread starter Neo
  • Start date Start date
N

Neo

I am writing an Outlook COM add-in in C# .NET. When I try to access mail
item, An outlook dialog box comes up asking:



A program is trying to access e-mail addresses you have stored in Outlook.
Do you want to allow this?

If this is unexpected, it may be a virus and you should choose "No".

Allow access for 1-10 minutes.



YES, NO, HELP



Any idea, how to allow access to this COM plug-in. There is no option for
allow access for always, only a max of 10 minutes.. This dialogbox again
comes up after 10 minutes, thus halting my application.

Regards,

Neo
 
MailItem is not restricted however certain properties of MailItems are
restricted. For example reading .Body or any email address property. To
avoid that you need to use a 3rd party library such as Redemption or use
Extended MAPI (C++ or Delphi only).

Unfortunately even with only running on Outlook 2003 and following the rules
for a trusted COM addin you're out of luck since .NET addins are never
trusted.
 
Derive all your Outlook objects from the Application object passed to you in
On_Connection.

This only works for Outlook 2003. No trusted addins for Outlook 2000 or 2002
unless they are trusted using the Exchange security form in the special
Exchange public folder.

Outlook 2003 addins created using .NET languages and using the Interop are
never trusted.
 
Back
Top