I'm using windows 10. So I have installed outlook.office365.com as a PWA through Edge Beta (Chromium based Edge). Now I would like to associate it with mailto links. How do I do that? I haven't found any information on how to use PWAs as a standard app for email on windows 10 so any pointers would be appreciated.
4 Answers
I think we can't associate outlook PWA with mailto
links. mailto
will open the system's default email client. What we select in the default app setting will decide which client the mailto
will launch.
After installing the outlook PWA, it doesn't show in the optional app list. You could try to search if it exists in your list:
Besides, there's not a setting I can find in outlook PWA which can set this app as the default email app.
Answering the OWA-specific question first, but then the general answer for app developers next.
For "improving" the OWA PWA, I found this answer, but it didn't work because my PWA is running at a weird URL like https://pod12345.outlook.com
and I was getting error Can only register custom handler in the document's origin.
This worked well enough, running in the devtools console after interacting with the page:
navigator.registerProtocolHandler("mailto", location.origin + "/owa/?&rru=compose&to=%s", "PWA Outlook");
and then manually approving the change.
Now (on macOS) clicking on a mailto:
link opens a OWA tab in a normal Chrome tab. The browser bar has a "pop out" icon to "Open with" the PWA which seems to work fine. This is Good Enough for me, because it doesn't waken the sleeping giant of desktop Outlook and I can quickly close the tab because I often click mailto
by mistake anyway.
Looking into why the link does't "deep link" into the PWA, it seems there's a property intent_filters
that needs to be set on the PWA app manifest, but it's not: i.e. https://pod12345.outlook.com/mail/pwa.json I think that's enough improvement, but somebody else is welcome to hack that too.
You asked on stackoverflow.com and not superuser.com, so I feel obligated to give the answer I'd want the OWA dev team to implement. It looks like protocol handers are supported now: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/URLProtocolHandler/explainer.md
I haven't tried it, but those docs point to two options, adding protocol_handlers
to your PWA app manifest:
"protocol_handlers": [
{
"protocol": "web+jngl",
"url": "/lookup?type=%s"
},
{
"protocol": "web+jnglstore",
"url": "/shop?for=%s"
}
],
or dynamically using registerProtocolHandler()
with user interaction like above.

- 6,100
- 2
- 46
- 50
You can't use the installed PWA, but you can make it that the browser opens the site in a new tab, when you click a mailto link. I found it here: https://www.alphr.com/gmail-default-windows-10-email-client/
You go to the settings of the chromium browser and search for "Handlers" in the Privacy and Security settings and there you "allow sites to ask to become the default handlers for protocols".
Then you go to your PWA mail site and click on the address bar symbol on the right and allow this site to be the default for mails.

- 301
- 1
- 3
- 15
Outlook (PWA) is now an option under Start, Settings, Default apps. screen shot of default apps

- 26
- 1