Ask Your Question

cannot set default e-mail program

asked 2019-01-04 17:50:50 +0200

Data Pro gravatar image

Windows 10 default e-mail application works for everything but LibreOffice. Tries to open the Outlook trial program no matter what default program is specified.

edit retag flag offensive close merge delete


And what default program is specified?

Mike Kaganski gravatar imageMike Kaganski ( 2019-01-04 18:16:30 +0200 )edit

Trying to use emClient. That is what is specified by Windows. There is no setting in Libreoffice to specify.

Data Pro gravatar imageData Pro ( 2019-01-04 18:19:13 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-01-05 00:40:02 +0200

updated 2019-01-05 00:57:21 +0200

LibreOffice's strategy to send mail on Windows is very simple. It is defined in its senddoc.cxx, and in layman terms may be described like this: "use one single MS API to do everything".

Specifically, it prepares all email information (recipients, mail body, attachments), and then calls MAPISendMailHelper (Simple MAPI) function. This is all what LibreOffice code does. So the end result depends on what MS MAPISendMailHelper function does itself.

Now let's see what MS code does, so that you can check if any mail client fulfills Microsoft expectations for proper default Simple MAPI provider registration. Briefly it's described here, but the function's source code is available in MS SDKs, and we can consult it to see it in greater details.

  1. It calls LoadLibraryW(L"mapi32.dll"); to load mapi32.dll library (it's a MS standard library normally found in Windows\System32 directory). It checks if the library has function named MAPISendMailW, and if it is present, simply calls it (it is true for Windows 8.0 and newer).
  2. Otherwise, it proceeds with explicit search for mail provider calling a function appropriately named LoadDefaultMailProvider.
  3. The latter (indirectly) checks registry under both HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE (in that order) for key Software\Clients\Mail.
  4. Then it checks if the calling application (in our case, it's LibreOffice's senddoc.exe) wants a specific mail provider (checking HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem\MSMapiApps). Note: LibreOffice itself doesn't write any explicit requirements there, so the check should not normally result in any explicit requirement.
  5. Then, it checks the provider name in the default value under Software\Clients\Mail (this is finally where the true default mail provider is registered!).
  6. Then it opens the subkey under Software\Clients\Mail with the name found at previous step. It checks if the provider is installed on demand, and if required, tries to install it on demand.
  7. After that, it checks the key opened on the previous step for DLLPath value, to get the actual MAPI dll provided by the default Mail application.
  8. If previous checks (under HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE) failed, it tries to load mapi32x.dll. Possibly that is what makes the fallback to the "Outlook trial program" on your system, and that means that the "emClient" isn't properly registered on your system (despite it claims to support Simple MAPI).
  9. It opens the selected library, and tries to call MAPISendMailW in it.
  10. If the previous step failed, it falls back to mapi32.dll's MAPISendMail. Here, again, fallback could happen.

The steps above may give you hints where to look for the missing registration bits. It may turn out that your email program doesn't support Simple MAPI at all; or it might not register properly. You might then file some support request against your mail application's vendor.

edit flag offensive delete link more


The user is not an administrative account, and had to have temporary admin rights to be able to fix the registry entries. This worked perfectly!

Data Pro gravatar imageData Pro ( 2019-01-05 20:39:59 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-01-04 17:50:50 +0200

Seen: 340 times

Last updated: Jan 05