➡️ Open the demo ⬅️
This is an installable email client app that demonstrates the PWA protocol handling feature, and showcases the application-title meta tag.
This demo doesn't actually send and receive emails.
This simulated email client PWA demonstrates how to use PWA protocol handlers. The app shows a list of received emails, and a compose button that displays a panel to compose a new email when clicked.
The app can be installed on the device, and upon installation will register a protocol handler for mailto.
When a mailto link is used, the operating system should propose the installed demo app as a choice to the user to handle that link. If the user chooses this demo app, it will be launched, and the compose panel will appear, pre-filled with the email address.
The two interesting pieces of code here are:
-
The
protocol_handlersmember in the manifest. -
The way protocol handling requests are detected and used in script.js.
This sample demonstrates the following features:
| Feature | Description | Documentation |
|---|---|---|
| Protocol Handling | mailto links are handled by the app to start composing a new email. |
Handle protocols in a PWA |
application-title meta tag |
The PWA makes runtime changes to the <meta name="application-title" content=""> element. |
application-title in <meta> name attribute at MDN. |
-
In the Address bar, click the App available. Install Email inbox (
) button.The app is installed.
-
Click the
mailtolink on that page.
- Test Progressive Web App (PWA) protocol handling
- Handle protocols in a PWA
- Email client in Progressive Web App samples.