Ayofayomi
Ayofayomi

Reputation: 95

How can i open a new email website or app on click of a button?

Please who can help me out I need my button to open up a new tab to the email website or on the email app on phone. I've been seeing the Mailto but i specifically need the Email(Gmail, Yahoo, Outlook etc.) to open at inbox and not as a new mail to be sent.

Upvotes: 1

Views: 827

Answers (1)

Renier Jr.
Renier Jr.

Reputation: 51

There is not really a a way of opening an app with html but you can open the email in a new tab:

<button onclick="window.open('https://gmail.com')">Gmail</button>

Or you can put it in a popup if you need:

<button onclick="window.open('https://gmail.com','popup','width=600,height=600')">Gmail</button>

Upvotes: 1

Related Questions