Samuli Hakoniemi
Samuli Hakoniemi

Reputation: 19049

mailto -link not launching on iOS Web App

I'm trying to launch a link with href="mailto:[email protected]" (also tried "mailto://[email protected]"). When I alert this.href, it returns the correct value, but nothing happens afterwards.

Is there a custom URL Scheme for Web Applications to launch Mail-program? This is working eg. with Maps, so I have no idea why same approach wouldn't work with E-mail.

Any suggestions?

Upvotes: 3

Views: 6936

Answers (2)

Ben in CA
Ben in CA

Reputation: 841

I'm finding that this seems to work well with iOS in web-app mode. Works for MAILTO: and SMS: links that otherwise gave an error. Also does not open a new blank page like some "solutions".

<a href='#' onclick='window.open(`mailto:[email protected]`, `_self`);'>Link text</a>

Upvotes: 0

Stavash
Stavash

Reputation: 14304

Taken from Apple's iPhone URL scheme guide:

enter image description here

Upvotes: 1

Related Questions