Hi am trying to create a button on my website called "Open My Inbox". ( Which user can quickly open their email inbox to verify the email received for account verification) When user clicking on that button it should show email apps available on the mobile such as ( gmail, yahoo or default)
Am aware of mailto: links, But is there any solution to open the default or other email application
Take your pick from below. Trick is in mailto
available ever since I know so.
What will happen is it will trigger an intent or some times called native intent.
Example: on desktop if there is email client that is configured in the system it will launch that. On windows browser sends email intent to system who then checks registry, if there is some software hooked on that intent it will launch and populate the data to software. If there isn't it will either throw odd error or simply stay silent.
Same is on mobile it will go through the same if there is any app hooked it will launch it. in most cases it would route it self to one set as default, tbh there is always a default app for email on mobiles.
Example of intent. if you have Instagram or facebook app running. go to google search for a user name then click on result to view, pop-up gets triggered open in facebook/Instagram or keep using browser. That is intent working in the background.
Other than triggering this feature you do not have much control over the whole process.
<button style="background-color: blue; color:white;" onclick="location.href='[email protected]';">Send Email</button>
<button style="background-color: blue;"><a href="mailto:[email protected]" style=" color:white;">Send Email</a></button>
<a href="mailto:[email protected]" style="display:inline-block; height:20px;width:80px;background-color: blue; color:white;">Send Email</a>
further reading