When trying to generate an email with an attachment from terminal server. Users get the error attached.
I've tried everything I can find online and antivirus is up to date. Any suggestions would be GREATLY appreciated.
Tried editing registry.
Tried editing programmatic access but its disabled for users on the terminal server.
You are getting a standard Outlook security prompt. The Send Message Warning is invoked when an untrusted solution attempts to send an item programmatically. This dialog box has a built-in timer that prevents untrusted add-ins from sending messages rapidly and automatically. The user must wait five seconds before clicking Allow. If the user clicks Deny, Outlook blocks the call that invoked the warning and returns the
MAPI_E_NOT_SUPPORTED
error. Subsequent calls to send messages programmatically will invoke additional warnings. If the user clicksAllow
, the call that invoked the warning, and only that call, is allowed. Subsequent calls from an untrusted solution to send messages programmatically will continue to generate warnings. Read more about that in the Security Behavior of the Outlook Object Model article.Possible ways to avoid such security prompts when dealing with the Outlook object model are:
Application
instance which doesn't trigger security issues.Trust Center
in Outlook to change the default behavior. To access theTrust Center
, selectTools
and thenTrust Center
. In theTrust Center
, clickProgrammatic Access
. TheProgrammatic Access Security
dialog provides options other than the default. These settings are only available if the current user is an administrator on the computer. Non-administrator users can see the current setting but will not be able to change it.Programmatic Access
settings can also be controlled throughGroup Policy
behavior.Note, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. See Considerations for server-side Automation of Office for more information.