Reputation: 2299
I have a messaging web app in AngularJS and I had already implemented sharing messages with standard mail clients with "mailto" like this:
<a class="list-group-item"
href="mailto:[email protected]?&
subject=Notificacion de Notificaciones+&
body={{mail.alert}} - {{mail.content}}">
<div class="media-box">
<div class="pull-left">
<em class="fa fa-envelope fa-2x text-warning"></em>
</div>
<div class="media-box-body clearfix">
<h4 style="padding: 5px; margin: 0px;" class="m0">Correo</h4>
</div>
</div>
</a>
That opens whatever email client the user has installed.
The problem is: if the user does not have an email client it does nothing.
What I want to do is a way to make a button to share directly to email via web browser, the same way you would share with Twitter or any social network.
Is there a way to do this or Gmail (or others like Yahoo, Outlook, etc.) doesn't allow this?
Upvotes: 0
Views: 1854
Reputation: 8096
When using mailto
it's up to the settings of the browser/os to open the correct mail client. If you want to use gmail you'l need to replace mailto
with an actual link.
This question will help-
how to insert gmail composing button in my website
Upvotes: 1