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: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.
I have used this and it seems to work with outlook, not using html but you can format the text with line breaks at least when the body is added as output.
No. This is not possible at all.
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...
Some things are possible, but not all, say for example you want line breaks, instead of using
<br />
use%0D%0A
Example:
It is possible to enter unicode values to insert newlines (ie:
\u0009
) but HTML tags have varying degrees of support and should be avoided.Here's how you add everything to a MAILTO link:
Each component is separated by the ampersand (&) sign. Only the first component after the initial email address has a question mark (?) preceding the ampersand.
URL-encode is the key! So for your example of a body, instead of your
...you might try:
Here's another route you might try. Create a javascript function to open an ActiveX object. This has the unfortunate limitation of only working in IE and Outlook, and may cause your page to show activex warnings. But if you can live with these caveats, it does the job. Here's a working sample you can draw from: