Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MAPI - Outlook - Need to suppress outlook security questions.

Status
Not open for further replies.

LunaRoja

Programmer
Sep 21, 2010
34
US
thread144-1268720

First, apologies if this is posted twice. I am new. I thought I posted this, but cannot find the original.

My problem: I want to use the MAPI process to automatically generate some simple emails. In testing I am using the 'MailResolveRecipient' and 'MailSend' methods of the 'MailSession' object. I get a security message when I invoke each method. For instance, the 'MailResolveRecipient' method pops up a question which is basically like "A program is trying to access e-mail address information stored in Outlook... and so on..."

I would like to suppress these messages since once I am in the program I have passed security tests. I noticed that there was a previous thread which is now closed and I tried to create a new one referencing that, but I evidently did not do the process correctly. I included the thread reference at the top of the page.

Any help that you can give will be greatly appreciated.

Thanks.... LR
 
Check out this link

Specifically the part:

The workaround is to disable this security prompt by setting/creating a REG_DWORD registry entry CheckAdminSettings = 1 located at HKEY_CURRENT_USER\Software\Policies\Microsoft\Security


You will need to do a RegistrySet in your PB code. I have not done this myself so I would try manually editing the registry to see if the change works. (Let us know when you get it working, please).

Matt

"Nature forges everything on the anvil of time"
 
Hello,

Thanks for your response. I have been away a few days.

I failed to mention, in my original post, that I am using Outlook 2007. I checked the link you indicated and, unfortunately, there is a caveat stating that the solution does not work with 2007. I tried it just to confirm it would not function.

I also tried a few other options, such as implementing the registry settings from the 'Programmatic security settings
' section of the article at
So, I am bringing my hat out again and hoping you or one of the other mail experts from the forum can give me another idea to try out.

I am very close. I have the application creating the session, verifying addresses, creating attachments and sending the mail. I just hate the thought of asking the user to continually respond to annoying messages.

Thanks much!

LR
 
You can always choose to send mail through SMTP.
Examples and code available here:


(only be aware that your antivirus might be protecting port 25 and you'd have to add your app as an exception to the antivirus (just like outlook does). Happened to me using McAffee).

once it works it's great!



regards,
Miguel L.
 
Thanks so much for all of your help. The users seem satisfied with the functionality even though they have to respond to a couple messages. The number of mails sent per day is small. If it appears that a change is required I think I will look into the SMTP approach.

Thanks again... LR...
 
Once again I would like to thank you both, Matt and Miguel. Matt, thanks for all the help getting the MAPI processes working. They were very challenging (at least to me). Miguel, I appreciate that you added the link to the SMTP example. We ended up using the SMTP approach because of the security popup issues and the link you provided was excellent.

Gracias amigos... LR...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top