Changing Mail System Drivers Using the Microsoft Mail System Selector 

This file describes how the Mail System Selector works. It also 
describes files used by the System Selector.

The Mail System Selector is a program delivered with Microsoft Mail Remote 
and other Mail client products. In Windows, the user clicks the Mail System 
Selector icon when he or she wants to switch to a different mail service such 
as AT&T. These mail services are called drivers in the program. The user
can also use this program to remove a driver they no longer require.

-----------------------------------------------------------------------
What happens when the user changes the current mail driver
-----------------------------------------------------------------------
1. The System Selector determines whether any of the mail driver DLLs are 
   currently loaded, by examining the entries in the [Providers] section 
   of the user's MSMAIL.INI.
	
   The System Selector interprets the entries in the [Providers] section 
   as module names for driver DLLs. If one or more DLLs are loaded, the 
   System Selector assumes a mail-enabled application is running. 

2. If a mail-enabled application is running, the System Selector asks the
   user if they want to sign out immediately. 

   After user confirmation, the System Selector attempts to sign out the 
   user. This may fail in some cases if, for example, Mail or Schedule+ 
   are displaying  modal dialogs. If sign-out fails, the System Selector 
   tells the user that they must be signed off before changing the mail 
   driver, and then it displays the main dialog.

3. The System Selector deactivates the current mail driver.
 
NOTE: In this section of the README file, PROVIDER is a placeholder for 
the specific mail driver subdirectory name. For example, the driver 
subdirectory for Microsoft Mail is \WINDOWS\MSMAIL\MSMAIL.)  

   a) If DEACTIVATE= is defined in \WINDOWS\MSMAIL\PROVIDER\FILES.INI,
      the named DLL is loaded and functions in it are called so that 
      specific environment changes can be properly cleaned up after the 
      provider has run.

   b) Entries are removed from the user's .INI files as follows:

      The INI= entry in the [Transport] section of 
      \WINDOWS\MSMAIL\PROVIDER\FILES.INI determines which .INI files will
      be modified. If this entry is missing, only MSMAIL.INI will be 
      modified. The [XXX - Deactivate] sections of the .INI files in 
      \WINDOWS\MSMAIL\PROVIDER list which entries will be removed from 
      the user's .INI files. For more information, see "The Mail Driver 
      *.INI Files" later in this document.

   c) The mail driver's  DLLs and other files are returned to 
      \WINDOWS\MSMAIL\PROVIDER. The Files= entry of the [Transport] 
      section in FILES.INI lists which files will be moved.

4. The System Selector activates the selected new driver.
	
   a) The mail driver's DLLs and other files are moved from 
      \WINDOWS\MSMAIL\PROVIDER to \WINDOWS\SYSTEM. The new driver's  
      FILES.INI file lists which files will be moved. 

   b) Entries are merged into the user's .INI files. The INI= entry in the 
      [Transport] section of \WINDOWS\MSMAIL\PROVIDER\FILES.INI 
      determines which .INI files will be modified. If this entry is 
      missing, only MSMAIL.INI will be modified.

      Sections that do NOT have the " - Deactivate" string as part of the 
      section name list which entries will be added. For more information,
      see "The Mail Driver *.INI Files" later in this document.

  c)  If ACTIVATE= is defined in \WINDOWS\MSMAIL\PROVIDER\FILES.INI, the
      named DLL is loaded and functions in it are called so that specific 
      environment changes can be properly set up by the provider.

5. The System Selector updates its display and the contents of MSMAILPV.INI
   to reflect the switch.

   If there is a failure anywhere along the way, the System Selector 
   backs out changes by first undoing whatever steps were taken in the 
   activation step, and then re-activating the original driver. 


-----------------------------------------------------------------------
The MSMAILPV.INI File
-----------------------------------------------------------------------
This section explains the entries in the Microsoft Mail driver profile file,
MSMAILPV.INI, which is installed in the \WINDOWS subdirectory. This file 
is maintained by the Setup and Mail System Selector programs and should not
be modified. The following paragraphs list values for each entry and what 
each entry means to the mail driver. 
   
   [Current]
      Transport=<Description>
      The transport is the currently installed mail driver. <Description> 
      is the friendly transport name, which is available for display in the 
      System Selector main dialog.

      PABID=<Identifier>
      Because personal address books (PABs) are stored in the .MMF file and 
      the Mail driver model assumes one .MMF file, the PABID must tell Mail
      which PAB should be used for the current transport. <Identifier> must
      be a three-character value. For example, the identifier for Microsoft
      Mail is currently PAB. The identifier for AT&T Mail is ATT. The 
      default value is PAB.

   [Transport]
      <Directory Name1>=<Description1>
      <Directory Name2>=<Description2>
      <Directory Name3>=<Description3>

      This section lists transports installed on the user's machine. 
      <Directory NameN> is the directory where the transport-specific files
      are installed. It is a subdirectory of \WINDOWS\MSMAIL. 
      <DescriptionN> is the corresponding friendly transport name.


-----------------------------------------------------------------------
Mail Driver *.INI Files
-----------------------------------------------------------------------
Each mail driver has a subdirectory in the \WINDOWS\MSMAIL directory. Each 
of these subdirectories contains INI files associated with that driver. The *.INI 
files have two basic sections: sections that are merged into \WINDOWS\*.INI
at activation and sections that are removed at deactivation. For example, 
here is the MSMAIL.INI that ships with Mail for PC Networks:

   [Microsoft Mail]
   Login=
   Password=
   StripGatewayHeaders=1
   CustomInitHandler=

   [Providers]
   Name=mssfs pabnsp
   Logon=mssfs
   Transport=mssfs

   [Microsoft Mail - Deactivate]
   Login=
   Password=
   StripGatewayHeaders=
   CustomInitHandler=

   [Providers - Deactivate]
   Name=
   Logon=
   Transport=

The [Section - Deactivate] sections contain entries that will be removed 
from MSMAIL.INI when the driver is switched out. The values of the entries 
in [Section - Deactivate] are ignored since the named entries are
actually removed. The deactivate keyword is " - Deactivate" (leading blank).
 

-----------------------------------------------------------------------
The FILES.INI File
-----------------------------------------------------------------------
Each mail driver subdirectory contains a FILES.INI file, which lists files 
specific to that driver. This file should not be modified. The entries in
FILES.INI are described below.

   Files=<FileName1> <FileName2> ... <FileNameN>
   These files are the DLLs and other data files required to support the 
   active transport. INI files are listed in the INI= section.

   PABID=<Identifier>
   Because personal address books (PABs) are stored in the .MMF file and 
   the Mail driver model assumes one .MMF file, the PABID must tell Mail 
   which PAB should be used for the current transport. <Identifier> must 
   be a three-character value. For example, the identifier for Microsoft 
   Mail is currently PAB. The identifier for AT&T Mail is ATT. The default 
   value is PAB.

   Activate=<DLL>
   If Activate is included, the named DLL is loaded and functions in it 
   are called when the transport is switched in so that specific 
   environment changes can be properly set up by the provider. There is no 
   default value.

   Deactivate=<DLL>
   If Deactivate is included, the named DLL is loaded and functions in it 
   are called when the transport is switched out so that specific 
   environment changes can be properly cleaned up after the provider has 
   run. There is no default value.

   INI=<FileName1> <FileName2> ... <FileNameN>
   If INI is included, each of the named INI files is merged with the 
   user's version in the Windows directory during a driver switch. 
   Otherwise, only MSMAIL.INI is merged.


