Use xdg email portal for the send plugin on linux

Currently when using the send plugin the ONLYOFFICE Desktop editor tries to find an email client from a small list of supported clients and will open the email in that email client.

Code here: desktop-sdk/ChromiumBasedEditors/lib/src/mailto.h at 81ab611fa408b5a84b6c373cb154e975ecae2074 · ONLYOFFICE/desktop-sdk · GitHub

This approach is flawed for the following reasons:

  • It does not work when the ONLYOFFICE editor is installed sandboxed like in a Flatpak or the email client is installed in a nonstandard location
  • It does not work when the user has a preferred mail client other than the 2 supported options.

That’s why I’m suggesting to use the xdg-desktop-portal email api instead. This will open the users preferred email client (according to the xdg-mime spec) and should also simplify the code a bit.

Documented here: Email - XDG Desktop Portal documentation

Onlyoffice desktop-apps already has a xdg-desktop-portal implementation that could be used to build this.

Hello @FriederHannenheim

Thank you for the suggestion. I have forwarded it to devteam.

I was informed that there are already plans to allow invoking the default mail client from Send plugin. Unfortunately, there is no ETA on a development available yet.