title: Is there any UI in Windows 10 to change the current MAPI provider?
body: <p>I want to write a custom send mail handler for Windows, including a Simple MAPI provider.</p>
  
  <p>On Windows, the current MAPI provider is stored in</p>
  
  <pre><code>HKCU/SOFTWARE/Clients/Mail
  </code></pre>
  
  <p>and</p>
  
  <pre><code>HKLM/SOFTWARE/Clients/Mail
  </code></pre>
  
  <p>(the former overriding the latter). But I found no Windows 10 UI to change this registry setting. In particular, when the user changes Settings -> Default apps -> Email, Windows changes the mailto association which is a separate setting, but the MAPI registry keys stay unchanged. Is there any way to change the MAPI provider or execute custom code when the user chooses a different default email app?</p>
  
  <p>These are the registry keys I install to make my MAPI provider known to Windows:</p>
  
  <pre><code>HKLM\SOFTWARE\Classes\CustomMapi.Mailto Type="string" Value="URL:MailTo Protocol"/&gt;
  HKLM\SOFTWARE\Classes\CustomMapi.Mailto Name="URL Protocol" Type="string" Value=""/&gt;
  HKLM\SOFTWARE\Classes\CustomMapi.Mailto\DefaultIcon Type="string" Value="[TARGETDIR]mailtohandler.exe,-1"/&gt;
  HKLM\SOFTWARE\Classes\CustomMapi.Mailto\shell\open\command Type="string" Value='"[TARGETDIR]mailtohandler.exe" "%1"'/&gt;
  HKLM\SOFTWARE\RegisteredApplications Name="CustomMapi" Type="string" Value="SOFTWARE\Clients\Mail\CustomMapi\Capabilities"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi Type="string" Value="CustomMapi"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi Name="DllPath" Type="string" Value="[TARGETDIR]custommapi.dll"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Capabilities Name="ApplicationName" Type="string" Value="CustomMapi"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Capabilities Name="ApplicationDescription" Type="string" Value="A custom MAPI provider."/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Capabilities\StartMenu Name="Mail" Type="string" Value="CustomMapi"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Capabilities\URLAssociations Name="mailto" Type="string" Value="CustomMapi.Mailto"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\DefaultIcon Type="string" Value="[TARGETDIR]mailtohandler.exe,-1"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Protocols\mailto Type="string" Value="URL:MailTo Protocol"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Protocols\mailto Name="EditFlags" Type="integer" Value="2"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Protocols\mailto Name="URL Protocol" Type="string" Value=""/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Protocols\mailto\DefaultIcon Type="string" Value="[TARGETDIR]mailtohandler.exe,-1"/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\Protocols\mailto\shell\open\command Type="string" Value='"[TARGETDIR]mailtohandler.exe" "%1"'/&gt;
  HKLM\SOFTWARE\Clients\Mail\CustomMapi\shell\open\command Type="string" Value='"[TARGETDIR]mailtohandler.exe"'/&gt;
  </code></pre>