0

I have a list of social sharing buttons on HTML. Clicking each of them allows to send an image (see the codepen sample). I would like to know if there's a way to attach the same image on the "Sending by mail" button, at the mail body.

<a href="https://www.facebook.com/sharer.php?u=http://www.designboom.com/contest/files/copy_0_brain1.jpg">
    Share on Facebook
</a>
<br/>
<a href="https://twitter.com/intent/tweet?text=pic.twitter.com/HntZUf55tt">
   Share on Twitter
</a>
<br/>
<a href="mailto:?subject=I like this &body=http://www.designboom.com/contest/files/copy_0_brain1.jpg">
    Send by mail
</a>
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Danielillo
  • 247
  • 2
  • 14

1 Answers1

1

As far I know the only way to achieve this is by using Base64 encoded images. See this answer:

Sending mail from HTML page with image in the body

Please keep in mind that you cannot use spaces as character. Email content have to be entity encoded. Otherwise some characters will break your code. Just use %20 instead of space. For further experiments with encoding you could try This online encoder

Community
  • 1
  • 1
Hexodus
  • 12,361
  • 6
  • 53
  • 72