Emailing out of outlook error with attachment

71 Views Asked by At

Error

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.

1

There are 1 best solutions below

0
On

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 clicks Allow, 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:

  1. Use a low-level API which doesn't trigger security prompts - Extended MAPI or any other wrapper around that API such as Redemption.
  2. Create a COM add-in where you could access a trusted Application instance which doesn't trigger security issues.
  3. Use third-party components that allow suppressing security prompts, see Outlook Security Manager for more information.
  4. Set up a group policy to not trigger prompts. Administrators can use the Trust Center in Outlook to change the default behavior. To access the Trust Center, select Tools and then Trust Center. In the Trust Center, click Programmatic Access. The Programmatic 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 through Group 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.