Moyosoft Products | Services | Download | Contact us    
Java Outlook Connector
Products  >  Java Outlook Connector  >  About Outlook Security    
About Outlook Security
This article presents various ways to manage the Outlook security for developers using the Java Outlook Connector product. Solutions are presented to avoid the often annoying Outlook security warnings.

Security warnings

The Outlook security provides Outlook with protection against viruses and worms trying to access Outlook data or trying to send e-mails on your behalf.

This affects applications you develop by displaying a warning message that need to be accepted by the user.

These security restrictions are often annoying for legitimate applications interacting with Outlook.
   

Third-party solutions

Solutions are available to overcome the security warnings and improve your application's usability:

      This tool allows you to determine the program accessing Outlook and specify the action to take automatically (e.g. allow access, block access).

      This software dismisses automatically the security warnings when they appear.

      This is a one-line programming library that allows you to disable Outlook security warnings in applications that interact with Microsoft Outlook


Using Outlook Security Manager from Java

The Outlook Security Manager is a component that allows you to disable Outlook security and avoid security warnings. The Outlook Security Manager is developer by Afalina Co Ltd and MAPILab Ltd, more information is available here:

http://www.add-in-express.com/outlook-security/

Java Outlook Connector has built-in support for the Outlook Security Manager. The class OutlookSecurityManager in the package com.moyosoft.connector.ms.outlook.util is a Java wrapper around the Outlook Security Manager.

To use this Java class, you'll have to deploy your software with the Outlook Security Manager product. You should include the file «secman.dll» to your setup package and register it on the end-user computer as a COM object. To register it you can use the regsvr32 utility or special options of your installer.


Example source code

Outlook outlook = new Outlook();
OutlookSecurityManager securityManager = new OutlookSecurityManager(outlook);

// Create a new e-mail
OutlookMail mail = new OutlookMail(outlook);

mail.setTo("test@example.com");
mail.setSubject("Test message");
mail.setBody("Hello world!");

// Turn OFF security warnings
securityManager.setSecurityWarningsEnabled(false);

// Send the e-mail
mail.send();

// Turn ON security warnings
securityManager.setSecurityWarningsEnabled(true);

System.out.println("Message was sent successfully.");
outlook.dispose();