php 纯文本电子邮件中的粗体文本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8954662/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 05:50:20  来源:igfitidea点击:

Bold text in plain text e-mail?

phpemail

提问by keeg

Is it possible to bold some text when sending a plain text email via PHP? Saw something that you could use

通过 PHP 发送纯文本电子邮件时是否可以加粗一些文本?看到了一些你可以使用的东西

*bold*

But it doesn't seem to be working...

但它似乎不起作用......

回答by Jere

Nope. Plain text is plain text.

不。纯文本就是纯文本。

You maybe thinking of a frameworklike markdown(which is what stackoverflow uses) to compile something like ** text ** into:

你想也许一个的框架,降价(这是计算器的使用)编译像** **文字到:

<strong>text</strong>

Like so: text. But the result would have to be HTML.

像这样:text。但结果必须是 HTML。

回答by WoLfulus

The only way to get this working is if your email client supports this type of format since plain text is just... well, text. You can even write in BBcode if your email client supports it. Of course that if you write something for someone using this "super client", the receiver will only be able to see the formatting if they also have the client installed.

让它工作的唯一方法是您的电子邮件客户端是否支持这种类型的格式,因为纯文本只是......好吧,文本。如果您的电子邮件客户端支持,您甚至可以用 BBcode 编写。当然,如果你为使用这个“超级客户端”的人写一些东西,接收者只有在他们也安装了客户端的情况下才能看到格式。