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.
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.