问题
I've noticed that on iPhone users who are using the Outlook app and do not have the native mail app configured, that when they click on mailto links it prompts them to create a new email account in iOS, instead of opening the Outlook app.
Is there anyway to have Outlook set as the default for mailto links on the iPhone?
回答1:
Instead of 'mailto:' protocol you can use below protocol to open outlook app
ms-outlook://compose?to=joe@example.com&subject=Hello
回答2:
iOS doesn't currently support changing the default apps used for composing email and the like.
回答3:
Duplicate, Already solved here: https://stackoverflow.com/a/33812714/1360730
To test try typing
ms-outlook://compose?to=a@a.com&subject=aaaa in the address bar on safari and see whether the outlook app opens up.
So your href would look something like,
<a href="ms-outlook://compose?to=a@a.com&subject=aaaa"/>
来源:https://stackoverflow.com/questions/30106599/how-do-i-get-mailto-links-in-ios-safari-to-open-the-outlook-app