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

Support the 'mailto' scheme #18049

Open
frewsxcv opened this issue Aug 11, 2017 · 5 comments
Open

Support the 'mailto' scheme #18049

frewsxcv opened this issue Aug 11, 2017 · 5 comments

Comments

@frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Aug 11, 2017

If I click on a mailto link, it should take me to my email client. I don't know if there's a spec for this, but most browsers handle this.

Example: click on https://rwell.org/ and click on 'email'

@frewsxcv
Copy link
Member Author

@frewsxcv frewsxcv commented Aug 11, 2017

I'm going to guess the main work here is finding out the default mail client for all platforms. At least on mac, I think that's via:

Might be nice if there was a small crate that handled this across all platforms. e.g. something like:

/// Given an application scheme, determine the path of the app for which it is registered to
fn scheme_app_lookup(scheme: &str) -> Option<Path> { .. }
@badboy
Copy link
Contributor

@badboy badboy commented Aug 11, 2017

There's open.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Aug 22, 2017

Can't that be handled directly by the embedder via WindowMethod::allow_navigation?

Basically, in ports/glutin/window.rs, in fn allow_navigation, we should test if the scheme is mailto:, and if so, use open (already used in components/script) to let the OS handle the URL.

@deg4uss3r
Copy link

@deg4uss3r deg4uss3r commented Oct 7, 2017

I made some progress on this by editing components/net/methods.rs mailto: links appear to be working and opening in the default email client (on my Mac) using open::that

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Oct 8, 2017

@deg4uss3r Please hold off your attempt; I agree with @paulrouget, this issue does not sound like it is servo's responsibility but rather the embedder's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.