Sending HTML in mailto anchor tag

31,306

Solution 1

The body part is supposed to be text/plain according to RFC 2368

Is it possible to add an HTML link in the body of a MAILTO link

Solution 2

I'm pretty sure this is impossible.

Solution 3

It will depend on the user's e-mail client setup.

If they've got "send e-mail in plain text" (or what ever the option is on their e-mail system) then the text will be interpreted as plain text.

If they got "send as HTML" then it should get encoded correctly.

You have no control over this.

Solution 4

I think is a email editor default options dependent. You telling to browser operation of open email editor then you can't say to it what method this email was send.

If you want have control with parameters like this you must implement sending mail by self.

Share:
31,306
user208662
Author by

user208662

Updated on July 12, 2022

Comments

  • user208662
    user208662 almost 2 years

    I have an anchor tag on my web page that is currently defined as:

    <a href="mailto:[email protected]?subject=Welcome&body=Check this out, please click <a href='http://example.com'>here</a>">Send to a Friend</a>
    

    As this link demonstrates, I'm trying to send some HTML in an email when a user clicks a link. However, when the text opens in the email editor, it is displayed as pure text. How do I get it to be in HTML format?

  • Piskvor left the building
    Piskvor left the building almost 14 years
    ...and rightfully so; if this were possible, it would be a pretty major security hole.