MailTo with HTML body


No. This is not possible at all.


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


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

something like

<a href='<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.

<a href=" world&body=Line one%0DLine two">Email me</a>

Here's how you add everything to a MAILTO link:

<a href=" &subject=Shipping%20Information%20Request&body=Please%20tell%20me%20if%20my%20order%20has%20shipped!">Shipping Request</a>

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

href='<b>ME</b>' 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:

        <script type='text/javascript' language='javascript'>
            function OpenOutlookNewEmail()
                    var outlookApp = new ActiveXObject("Outlook.Application");
                    var nameSpace = outlookApp.getNameSpace("MAPI");
                    mailFolder = nameSpace.getDefaultFolder(6);
                    mailItem = mailFolder.Items.add('IPM.Note.FormA');
                    mailItem.Subject = "Me";
                    mailItem.To = "";
                    mailItem.HTMLBody = "<b>ME</b>";
                catch (e)
                    // act on any error that you get
        <a href='javascript:OpenOutlookNewEmail()' >email</a>

It is possible to enter unicode values to insert newlines (ie: '\u0009') but HTML tags have varying degrees of support and should be avoided.

Some things are possible, but not all, say for example you want line breaks, instead of using <br />use %0D%0A


<a href="mailto:?subject=&body=Hello,%0D%0A%0D%0AHere is the link to the PDF Brochure.%0D%0A%0D%0ATo view the brochure please click the following link:"><img src="images/email.png" alt="EMail PDF Brochure" /></a>