Include a picture in mailto:

青春壹個敷衍的年華 提交于 2021-02-05 08:49:58

问题


I'm interested in placing a picture (along with some text) in a prepared email for the user to send off. Is there any way to use mailto: to do that?


回答1:


No. The mailto: scheme does not support attachment. (See http://www.faqs.org/rfcs/rfc2368.html).

If you write an app you can attach an image with MFMailComposeViewController.




回答2:


No, mailto: is just a HREF target for the A tag, and just instructs the operating system to open the mail browser to a specific location (with subject). To send a custom email on click of a link, you'll need server side code, such as PHP (sendmail) or Ruby (ActionMailer)




回答3:


I think the best you can do is link to an image, like this:

<a href="mailto:?to=joe@example.com&body=http://www.mydomain.com/myimage.jpg">test</a>


来源:https://stackoverflow.com/questions/2119574/include-a-picture-in-mailto

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