用换行符替换字符串中的逗号并以html格式发送电子邮件 [英] replace commas in string with line breaks and send email in html format
本文介绍了用换行符替换字符串中的逗号并以html格式发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个长字符串,其中包含逗号分隔值。我想用换行符替换逗号并使用以下代码通过电子邮件发送它。使用以下代码替换逗号。
string replce = Regex.Replace(bodystr,,,Environment.NewLine);
但是在电子邮件中它没有显示行break ...例如,如果我的原始字符串是abc,bcd
在电子邮件中显示为abc bcd。我需要把它们显示为..
abc
bcd ..怎么做?帮我...
i have a long string which has comma seperated values in it.i want to replace commas with line breaks and send it in e mail.i m using the following code to replace commas by line breaks.
string replce = Regex.Replace(bodystr, ",", Environment.NewLine);
But in email it doesnt show line breaks..for example if my original string is "abc,bcd"
in email it displays as abc bcd. i need to display them as..
abc
bcd..how to do it?Help Me...
推荐答案
你提到html,html中的换行符应该是
You mentioned html, line break in html should be
<br>
这篇关于用换行符替换字符串中的逗号并以html格式发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文