Here I need to send one mail with mailto(html)
or mail_to(rails)
function. But the problem is with mail body, how to attach the body with mailto function, I mean , when I click on this Mail link one Gmail client will open, so I need to get the imageURL in client body section.
<script type="text/javascript">
var **imageURL**;
function code (email) {
imageURL = "https://chart.googleapis.com/chart?
chs=150x150&cht=qr&chl=13&choe=UTF-
8";
$("#image_url").val(imageURL);
$("#mailhere").html("<a class='btn btn-primary pull-left'
href='mailto:"+email+"'>**Mail**</a>");
}
<div class="modal-footer" id="qr-code-footer">
<a id="printme" href="#" class="btn btn-primary pull-left">Print</a>
<div id="mailhere" class="span1">
</div>
</div>
Thank you
$("#mailhere").html("<a class='btn btn-primary pull-left' href='mailto:"+email+"&body=" + encodeURIComponent(imageURL) + "'>**Mail**</a>");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.