HTML: send image in mailto?body

11,981

Solution 1

From the horse's mouth:

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.

In other words, the content is in text/plain format, not MIME HTML.

Solution 2

What you are asking is not possible. mailto is limited to send texts and promotional msgs, so you cant attach an image with mailto.

Share:
11,981
MeltingDog
Author by

MeltingDog

Updated on June 14, 2022

Comments

  • MeltingDog
    MeltingDog almost 2 years

    I am used to setting the body and subject of an email with text with the mailto function, eg:

    href="mailto:?body=Thanks!"
    

    But is there a way to send an image in the body? Eg:

    href="mailto:?body=<img src='http://www.example.com/image.jpg'>"
    

    (obviously above doesn't work - it just adds the html as a string)

    Any advice appreciated! Thanks!