HTML: send image in mailto?body

吃可爱长大的小学妹 提交于 2019-12-07 07:36:30

问题


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!


回答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.




回答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.



来源:https://stackoverflow.com/questions/11680826/html-send-image-in-mailtobody

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!