MailTo with HTML body

My problem goes something like this:

A client receives an email sent by Exchange Server. In the mail he has a formatted body with HTML with a couple of links that have

href='mailto:etc...'

My question is: can i insert HTML formatted body in the mailto: part of the href?

something like

<a href='mailto:me@me.com?subject=Me&body=<b>ME</b>'>Mail me</a> ?


Note that (2016) in iOS, it is perfectly fine to add <i> and <b> tags for simple italic, bold formatting.


As you can see in RFC 6068, this is not possible at all:

The special <hfname> "body" indicates that the associated <hfvalue> is the body of the message. The "body" field value is intended to contain the content for the first text/plain body part of the message. The "body" pseudo header field is primarily intended for the generation of short text messages for automatic processing (such as "subscribe" messages for mailing lists), not for general MIME bodies.


不,这根本不可能。


Whilst it is NOT possible to use HTML to format your email body you can add line breaks as has been previously suggested.

If you are able to use javascript then "encodeURIComponent()" might be of use like below...

var formattedBody = "FirstLine n Second Line n Third Line";
var mailToLink = "mailto:x@y.com?body=" + encodeURIComponent(formattedBody);
window.location.href = mailToLink;
链接地址: http://www.djcxy.com/p/92770.html

上一篇: 可靠地阻止电子邮件地址

下一篇: MailTo与HTML正文