【发布时间】:2014-05-01 18:52:05
【问题描述】:
我需要一些帮助来发送格式化的电子邮件。下面是我的代码。
我希望“评论:”字符串以粗体显示。如何在 vb.net 或 C# 中做到这一点
oBLL.Comments = "Comments:" + txtComments.Text
mailBody.Append(oBLL.Comments)
【问题讨论】:
-
如果您将其作为 HTML 电子邮件执行,为什么不简单地添加 和 标签?
-
@user3557882 你能写代码吗? ?在哪里添加字体样式?
-
我不相信你可以加粗字符串;只有
txtComments字段中的Text。但如上所述,请使用HTML中的<b></b>标记作为电子邮件。 -
@logixologist 我试过了,它不起作用
-
试试这个:
oBLL.Comments = "<b>Comments:</b>" + txtComments.Text。确保您已将电子邮件设置为 HTML 电子邮件。
标签: c# asp.net .net vb.net html-email