Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for mailto: urls #16

Open
wants to merge 1 commit into
base: master
from

Conversation

@ryanmcgrath
Copy link

ryanmcgrath commented Dec 18, 2019

Heya,

I saw someone over on Reddit asking why Protonmail doesn't support mailto: style links. I'd been looking to mess around with the iOS codebase and had some free time, so experimented with adding it.

From what I read on another issue you've got a refactor going on internally, so no worries if this doesn't fit right now - just wanted to throw it out there and open discussion on it. The reason something like this would be nice is that if it's supported, then Firefox on iOS could open mailto: links in Protonmail if the user chooses it in settings.

I made the requisite changes in Firefox iOS already, could pull request them over there if/when this is deemed okay over here.

Not 100% happy about the Dispatch delay hack but I didn't want to muck too much with altering the internal structure. Open to comments/critiques/etc for sure.

A simple test project can be drummed up by making a blank iOS project in Xcode, whitelisting LSApplicationQueriesSchemes to include protonmail, and then dumping something like the following in applicationDidFinishLaunching:

let url = URL(string: "protonmail://compose?to=ryan@venodesigns.net,ryan_fb@venodesigns.net&cc=bert@ryanmcgrath@protonmail.com&bcc=ryan@rymc.io&subject=lol&body=Hello%20thar")!

UIApplication.shared.open(url)

Hope it's useful!

…ox on iOS supporting Protonmail as an email app it can call to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.