I have a couple of mailto
links in a HTML document.
<a href="mailto:etc...">
Can I insert HTML formatted body in the mailto:
part of the href
?
<a href="mailto:[email protected]?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.
The Mailto format does not support HTML code emails. Outlook was used at 2003, but to become compliant with the mailto: standard they removed that functionality. But you can Use %0D%0A for a line break in HTML body.
HTML Email Tag HTML <a> tag provides you option to specify an email address to send an email. While using <a> tag as an email tag, you will use mailto: email address along with href attribute. Following is the syntax of using mailto instead of using http.
In the message, select the text or picture that you want to display as the link. On the Insert tab, click Link or Hyperlink. Under Link to, click E-mail Address. Either type the email address that you want in the E-mail address box, or select an email address in the Recently used e-mail addresses list.
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:[email protected]?body=" + encodeURIComponent(formattedBody); window.location.href = mailToLink;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With