如何在电子邮件正文C#API中添加图像或徽标?

时间:2019-05-16 02:44:43

标签: c# gmail

我已经在邮件正文中添加了img标签。但这不是显示。 请帮助我。

我的代码:

string PathLogo = System.Web.HttpContext.Current.Server.MapPath("~/Data/Asset/logosinhan.png");
LinkedResource logo = new LinkedResource(PathLogo);
logo.ContentId = "shinhanlogo";
string imgSrc = "<img src=cid:shinhanlogo/>";
emailInfo.Content = emailInfo.Content.Replace("$Logo", imgSrc)

0 个答案:

没有答案