简体   繁体   中英

Sending HTML in mailto anchor tag

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

<a href="mailto:someone@somewhere.com?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?

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

我很确定这是不可能的。

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM