Register as a protocol handler for mailto links
Is there any way to register the Nextcloud version of Rainloop as the default protocol handler for mailto: links? The stand-alone version of Rainloop appears to be able to do this and our current Roundcube installation can do this.
How do you do it on the standalone Rainloop? Normally, Rainloop for Nextcloud is an integration of Rainloop standalone into Nextcloud so all features of Rainloop should be available.
I wonder if this can be related to #18 somehow
Well this feature I find quite interesting! Looking forward to the new changes 😄.
This feature already exists to some extent. I am not sure yet why its not prompting to register the protocol within nextcloud but you can still register the app to open links.
e.g.) navigator.registerProtocolHandler("mailto","https://yourdomain.com/nextcloud/index.php/apps/rainloop/app/?mailto&to=%s","Rainloop");
Notice in the url "rainloop/app/". This will open the URLS in the app, providing your config is correct. The config and code I had to tear apart for an hour to figure out what is happening. Basically I found that I had to configure this setting in the application.ini
sign_me_auto = "DefaultOn"
By default, the value must have been "DefaultOff"
Within nextcloud itself I was noticing mailto does not work from the contact search, but I dont think this is a Rainloop issue and after a little more research I will see if I cannnot open an issue with nextcloud/server on this problem. The contact search ( on upper right of nextcloud, and I have not checked other locations) utilizes uri encoding on the address-spec including @ and : which is explicitly excluded from uri encoding in RFC 6068.
addr-spec is a mail address as specified in [RFC5322], but excluding
from [RFC5322]. However, the following changes apply:
- A number of characters that can appear in addr-spec MUST be percent-encoded. These are the characters that cannot appear in a URI according to [STD66] as well as "%" (because it is used for percent-encoding) and all the characters in gen-delims except "@" and ":" (i.e., "/", "?", "#", "[", and "]"). Of the characters in sub-delims, at least the following also have to be percent- encoded: "&", ";", and "=". Care has to be taken both when encoding as well as when decoding to make sure these operations are applied only once.
Im not clear what the problem is with registering the handler without pointing to the /app/ directory, but if this is wrong in the contact list, perhaps its also contributing to this problem I could not resolve.
Opened case on contacts menu with nextcloud https://github.com/nextcloud/server/issues/10279 but after some thought I am not convinced urlencode on mailto links has anything to do with why nextcloud is not prompting me to use the site as a mailto handler. Perhaps it has more to do with the Content Security Policy ( CSP ) issues for which there are several cases open right now.
Hi, I've seen this about the app Mail on NC and it works. https://help.nextcloud.com/t/nextcloud-as-handler-of-mailto-links/27277 I hope that it could be done for Rainloop too Thank
Related to that one: https://github.com/RainLoop/rainloop-webmail/issues/1642
We would need to call this in the Rainloop js: https://developer.mozilla.org/fr/docs/Web/API/Navigator/registerProtocolHandler But for now this fails to work in my tests...