Platform SDK: MAPI

Adding Your Mail Client to the File.Send Menu

You add your mail client to Send on the File menu in applications that use simple or extended MAPI by doing the following:

  1. Create the HKEY_LOCAL_MACHINE\Software\Clients\Mail\MyMailClient registry key.
  2. If your mail client supports the Microsoft Software Installer (MSI), follow the instructions in Setting Up the MSI Keys for Your MAPI DLL. Otherwise, proceed with the following steps.
  3. Set the HKEY_LOCAL_MACHINE\Software\Clients\Mail::(default) value to identify your client's subkey; for example, (REG_SZ) MyMailClient.
  4. Create the HKEY_LOCAL_MACHINE\Software\Clients\Mail\MyMailClient::DLLPath and set the value to (REG_SZ) c:\path\to\MyMAPI.dll, or (REG_EXPAND_SZ) %ENVVAR%\MyMAPI.dll, where the path identifies the DLL that exports simple MAPI functions. Note that use of environmental variables in the path is supported; the stub library performs the substitution when resolving the path.
  5. If your mail client supports extended MAPI functions, create the HKEY_LOCAL_MACHINE\Software\Clients\Mail\MyMailClient::DLLPathEx value and set the value to (REG_SZ) c:\myinstall\MyMAPIex.dll, or (REG_EXPAND_SZ) %ENVVAR%\MyMapi32.dll, where the path identifies the DLL that exports extended MAPI functions. Note that use of environmental variables in the path is supported; the stub library performs the substitution when resolving the path.