Bug 97792 - Sending mail fails on Windows 10 with Mail app
Summary: Sending mail fails on Windows 10 with Mail app
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.0.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: File-Send
  Show dependency treegraph
 
Reported: 2016-02-12 11:00 UTC by Gerhard Schaber
Modified: 2024-06-27 03:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Schaber 2016-02-12 11:00:02 UTC
With Windows 10 it is not possible to send mail via the Mail app. Neither via the File menu, nor via Basic:

mailSvc = createUnoService("com.sun.star.system.SimpleSystemMail")
mailClient = mailSvc.querySimpleMailClient()
msg = mailClient.createSimpleMailMessage()
msg.setRecipient(mailAddr)
msg.setCcRecipient(Array(mailCCAddr, ";"))
msg.setSubject(subject)
msg.Body = "Content"
mailClient.sendSimpleMailMessage(msg, com.sun.star.system.SimpleMailClientFlags.DEFAULTS)

The default client is set to the Mail app that is coming with Windows 10.
Windows 10 Pro 64bit in Virtualbox VM.

It works with normal (non app?) programs such as Mozilla Thunderbird.
Comment 1 Xisco Faulí 2017-04-13 09:46:06 UTC
Hello Gerhard,

Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 Gerhard Schaber 2017-04-13 15:02:40 UTC
Same thing. Tried with 5.3.2.2.

I have even installed the Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 from https://www.microsoft.com/en-us/download/details.aspx?id=1004, and selected the Windows mail app as default mail application in Windows 10 (version 1703, build 15063).
Comment 3 Dennis Roczek 2017-04-24 09:46:05 UTC
That's strange. When Mail is the Standard App; mailto: Links do open Mail but when sending per Writer Outlook opens and attaches file...

something is fishy here!
Comment 4 Gerhard Schaber 2017-04-24 10:16:07 UTC
It seems it uses a different protocol when mailto is associated with an app instead of a desktop program.
Comment 5 Dennis Roczek 2017-04-24 15:34:24 UTC
no, i just rechecked: the mailto: protocol is associated at the moment with Mail.

so, I have no clue. ;-)
Comment 6 Sam Smith 2018-09-24 10:34:43 UTC Comment hidden (spam)
Comment 7 Ava William 2018-10-29 09:47:02 UTC Comment hidden (spam)
Comment 8 Ramson Roni 2019-05-08 22:59:18 UTC Comment hidden (spam)
Comment 9 AngelaAngie 2020-03-28 11:36:57 UTC Comment hidden (spam)
Comment 10 QA Administrators 2022-03-31 03:34:20 UTC Comment hidden (obsolete)
Comment 11 Gerhard Schaber 2022-03-31 15:51:19 UTC
Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: de-AT (de_AT); UI: de-DE
Calc: threaded

Same behavior.
Comment 12 Gerhard Schaber 2022-03-31 16:01:53 UTC
Interesting, with Mozilla Thunderbird installed, and Mail being the default mail application, the piece of code above starts Thunderbird instead of Mail.

When I check in the Windows settings the standard apps based on the protocol, for protocol "Mailto" it says "Thunderbird URL" on the left side, and "Mail" being the associated default app on the right side.
Comment 13 Gerhard Schaber 2022-03-31 16:20:07 UTC
It seems to be only related to what is in HKEY_CURRENT_USER\Software\Clients\Mail\default, and not the configured default Mail app. But this could be more like a general Windows issue
Comment 14 Gerhard Schaber 2022-03-31 16:23:14 UTC
"Thunderbird URL" is used in HKEY_CLASSES_ROOT\mailto for some reasn, even, if the default mail app is Mail.
Comment 15 Mike Kaganski 2022-06-27 07:05:39 UTC
So:

1. LibreOffice uses Simple MAPI protocol on Windows in com.sun.star.system.SimpleSystemMail implementation (also used for File->Send->Email Document);
2. The protocol is configured in system under two registry keys:
  * HKLM\Software\Clients\Mail
  * HKCU\Software\Clients\Mail (overrides the default setting for current user)
and is independent of the mailto protocol (which is unable to control e.g. attachments without non-standard extensions unsupported in current clients for security reasons);
3. There is no easy UI to define Simple MAPI client in current Windows [2];
4. So this is possible in your system have one app assigned to mailto protocol, and another set as default Simple MAPI app (either per user, or system-wide).

Windows Mail from the store does not set itself as Simple MAPI application (I have no idea if it actually can use that API, but if it can, then it is its failure to configure itself).

This is not a LibreOffice bug, and possibly best closed as NOTOURBUG.

[2] https://stackoverflow.com/questions/54346779/is-there-any-ui-in-windows-10-to-change-the-current-mapi-provider
Comment 16 QA Administrators 2024-06-27 03:16:13 UTC
Dear Gerhard Schaber,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug