开发者

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开发者_Go百科 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'm pretty sure this is impossible.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜