Writing an Automated Client

An automated client application is an application that runs unattended, displaying no user interface. By default, many MAPI interface methods show a user interface. All of these methods have flags that allow a client to either allow or suppress this display. Although MAPI expects service providers to honor these flags, there are some providers that do not always meet these expectations. A legitimate reason for not honoring the flags is the reliance of the service provider on another service that does not allow user interface suppression. If you are developing an automated client, pay careful attention to the service providers you are using and how they are configured. Do not assume that all of your calls to suppress a user interface will be successful.

Automated clients must have the necessary information available for proper configuration of each of the message services in the profile. There are two ways to supply configuration information at logon time:

Since the second option is unavailable to automated clients, these clients must use the first option. Clients must configure their profiles carefully to ensure that this option always works.

Using a profile created previously for another purpose is allowable but will not work if the user has chosen not to cache credentials for one or more services. On Windows 95, caching credentials may not work due to password cache control. If the profile is created when the user is logged on to a network, and subsequently used when not logged on to a network, cached credentials will be unavailable.

Automated clients always set the MAPI_NO_MAIL flag in the MAPILogonEx function call to begin a MAPI session.