开发者

Encoding mailto link with body text

I'm trying to create a mailto link using PHP. Basically my function gets the body text from database and then creates the html tag like this:

<a href="mailto:?subject=sample&body=sometexthere">send</a>

well, the problem is that my body text may contain non standard characters, like accents and so, so i need to encode the body text before output it; but i don't know how to do it because when my mail client opens (Windows Live Mail) it displays wrong characters for the body.

How can i sol开发者_开发知识库ve this? what is the right encoding to use unicode text into the body?

many thanks in advance,


I beleive you're looking for php's htmlentities() function.


You have to implement those replacements

http://www.ietf.org/rfc/rfc2368


Be aware that there seems to be an issue with Outlook if there are non-Ascii characters in sometexthere.

See this post: mailto special characters

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜