更新时间:2022-12-03 09:18:35
检查此链接:
[ ^ ] uote>或者:如何在asp .net邮件发送中为电子邮件正文设置背景图像? [ ^ ]
我试过但不工作,不需要,要求:< div style =background-image: URL(CID:身体意象);>Hi,
I have html page, which contain a div
i want to add dynamically image path in above div , and send to as mail by c#. But the background image is not showing in my email, i do not requries
What I have tried:
AlternateView View = default(AlternateView);
LinkedResource resource = default(LinkedResource);
View = AlternateView.CreateAlternateViewFromString(body, null, "text/html");
resource = new LinkedResource(HttpContext.Current.Server.MapPath("abc.png"));
resource.ContentId = "bodyimage";
resource.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
View.LinkedResources.Add(resource);Check this link:
[^]
or this: How to set background image for email body in asp .net mail sending?[^]
i tried but not working, not required ,require: <div style="background-image:url(cid:bodyimage);>