2

I am using mailto function my requirement is like to embed image inside mail body

 $scope.generateMail = function () {
        var graph = document.getElementById('thumb_graphs_grp');
        html2canvas(graph).then(function(canvas) {
        var dataURL = canvas.toDataURL();
        var image = new Image();
        image.src = canvas.toDataURL("image/png");
        var imageHTML = "<img " + "src='" + image.src + "' img/>";
        var link = "mailto:mail@example.org?subject=Mail request&body="+ imageHTML;
        window.location.href = link;
    });
arun kumar
  • 105
  • 2
  • 10
  • I want the image inside mail body but i am converting to data url is their any other way to append the image inside mail body? – arun kumar Oct 25 '16 at 09:19

1 Answers1

1

As stated in the RFC2368, it's not possible to include HTML with mailto:

The special hname "body" indicates that the associated hvalue is the body of the message. The "body" hname should contain the content for the first text/plain body part of the message. The mailto URL is primarily intended for generation of short text messages that are actually the content of automatic processing (such as "subscribe" messages for mailing lists), not general MIME bodies.

Veve
  • 6,643
  • 5
  • 39
  • 58