【发布时间】:2012-07-11 21:49:49
【问题描述】:
我想做的是;
for (int i = 0; i < thexfiles.Length; i++)
{
tosend = tosend + "<tr><td>"+thexfiles[i]+"</td><td>"+thexdates[i]+"</td></tr><tr>";
}
mail.Body = tosend;
我想将数据插入到 C# 代码中的表中(也许使用 html?),所以当它被邮寄时它看起来很干净。
【问题讨论】:
-
那么到底是什么问题呢?你已经向我们展示了你自己的答案......
-
那代码不起作用,它只是发送
+thexfiles[i]+ +thexdates[i]+ 发送邮件 添加表格标签并设置mail.IsBodyHtml = true;提问前请使用谷歌搜索或stackoverflow搜索-那里有很多信息stackoverflow.com/questions/1329922/…thexfiles是什么类型?你试过thexfiles[i].ToString()吗?
标签: c# html html-table html-email