Specify email client in TLMDMapiSendMail?

It seems that Windows 10 strangely does not update the registry setting used by "Send To" and Mapi that launches the email client set up as the "Default App" setting.  For example, I have the default set to Outlook yet it still brings up Thunderbird because that is the registry setting under: HKEY_CURRENT_USER\SOFTWARE\Clients\Mail

If I manually change that setting to Microsoft Outlook, then TLMDMapiSendMail launches Outlook.  So, since all the installed clients are located in HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail (not HKEY_CURRENT_USER\SOFTWARE\Clients\Mail), would it be possible to pass the email client we want to TLMDMapiSendMail to invoke the email client of our choice or somehow honor the Windows 10 Default email app?

This is what I came up with playing around with settings:

Windows 10 "Default apps" setting writes to here:

"ProgId" samples:

Following "ProgId" values gets these:

"C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -osint -compose "%1"

"C:\Program Files (x86)\Microsoft Office\Root\Office16\OUTLOOK.EXE" -c IPM.Note /mailto "%1"

"Send To" and Mapi send mail uses this (not sure what changes this, it was set to "Mozilla Thunderbird" so I had to change it to "Microsoft Outlook" manually to match what comes from HKEY_LOCAL_MACHINE which contains all the mail clients):

"(Default)" samples:
Mozilla Thunderbird
Microsoft Outlook

Following "(Default)" values gets these:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Microsoft Outlook\shell\open\command
"C:\Program Files (x86)\Microsoft Office\Root\Office16\OUTLOOK.EXE" /recycle

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Mozilla Thunderbird\shell\open\command
"C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -mail


  • 2 Comments sorted by Votes Date Added
  • edited July 28 Posts: 0 Accepted Answer Vote Up0Vote Down
    Our component provides Profile property (moUseDefaultProfile option flag should be off), which can be used to switch between MAPI profiles. I'm personally have no practical experience with profiles, but you can read Microsoft documentation here: 

  • I am just slightly familiar with Profiles within Outlook, but if memory serves me right, that won't help here.  However, I went ahead and added code in my app to allow the user to select what email client they want to use based on the list in HKEY_LOCAL_MACHINE, defaulting to whatever MAPI is currently set to in HKEY_CURRENT_USER.  I then save the current setting and update the registry with the user selection before invoking TLMDMapiSendMail to send the mail which works for what I need.
Sign In or Register to comment.