如何在c#.net中发送启用HTML的主题邮件 [英] how to send html enabled subject mail in c#.net

查看:92
本文介绍了如何在c#.net中发送启用HTML的主题邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我在发送邮件表单C#中有一个小问题.我有什么主题,其中包含html代码,因此在最终用户邮件中,它需要以平面格式显示.我用这行mailMessage.IsBodyHtml = true;但它似乎只对身体有效.请让我知道.快速响应表示赞赏.

hi everyone,
i have a small issue in the sending mail form c#. what it is i have subject which contains html code, so at end user mail its need to display in plane format. i used this line mailMessage.IsBodyHtml = true; but it seems to work only for body. please let me know. quick response appreciated.

thanks in advance.

推荐答案

我使用了这一行mailMessage.IsBodyHtml = true;但它似乎只对身体有效.请让我知道
您甚至看过带有主题格式的电子邮件吗?我还没有.电子邮件主题未启用HTML.您不能像在身体中那样对其中的几个字母或单词加粗.这就是为什么IsBodyHtml属性仅适用于电子邮件正文而不适用于主题的原因.传递给主题文本的所有内容均按原样呈现.
i used this line mailMessage.IsBodyHtml = true; but it seems to work only for body. please let me know
Have you even seen an email with subject formatted? I have not. Email subjects are not HTML enabled. You cannot bold few letters or words in it as you can in the body. That''s why IsBodyHtml property is only for body of the email and not the subject. Whatever is passed for subject text is rendered as is.


这篇关于如何在c#.net中发送启用HTML的主题邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆