I know you can have someone open their local email application (like 'mail.app' on mac or outlook on windows) and compose a new message with the following
window.location.href = "mailto:[email protected]";
I was wondering if it is possible to open the local email application without also composing a new message?
The use-case is, after registration, people need to check their email to confirm their account. I do not need them to send a message.
UX notes outside the scope of this question I do not force a redirect, but rather I have a 'check my email' and 'skip' button after logging in. I have coded, that 'if the email contains gmail.com' to redirect to mail.google.com, but there is no way to exhaustively hard-code all possible email addresses and to which url they should be redirected? therefore if the email address is not any of the major ones, I would like to opt to open the user's local email client (without composing an email message) - if this is possible.
This isn't possible from a technical perspective. There's no mechanism provided for it via JavaScript. The browser simply doesn't have that kind of permission to open a desktop app, and nor should it.
It may open a mail client specifically using the "mailto:" protocol for the single purpose of pasting the email address from the mailto link into the user's default mail client. Similarly, other protocols may (optionally) be matched to certain applications (e.g. tel: to start a phone call) on the device, but again only a very specific action can be carried out. It's not possible to simply open any arbitrary desktop application with no specific purpose in mind, no mechanism exists for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With