2

I need to trigger a classic mailto:mail@mail.com link in a Angular 2 website, but i've found that my machine's (windows 10) "mailto" protocol is associated with "chrome" and not with "mail" app. I need to alert the user if this thing happens, but i don't know how to access to this information.

If i manually associate (within Windows Control Panel) the "mailto" protocol to Mail App, everything works fine (chrome, ie, edge, etc...).

Is there a way to do that in Javascript or Angular 2?

Richard M.
  • 33
  • 4
  • Why would you need to alert the user, when the exact thing they have _configured_ on their system happens? If you can’t deal with that the user decides which application to use to send their mails, then you have chosen the wrong tool for the job to begin with. – CBroe Aug 29 '17 at 09:24
  • 2
    Because if no Mail program is associated with a "mailto" link, the page blanks for a millisecond and nothing happens. This is not good for user experience – Richard M. Aug 29 '17 at 09:26
  • _“This is not good for user experience”_ - congratulations, you just found the most important thing about `mailto:` // What has your research turned up so far? https://stackoverflow.com/q/7214686/1427878, https://stackoverflow.com/q/836777/1427878, https://stackoverflow.com/q/2274405/1427878, https://www.uncinc.nl/articles/dealing-with-mailto-links-if-no-mail-client-is-available – CBroe Aug 29 '17 at 09:43

0 Answers0