Thread: ASP.NET/Embed an Image in Email using ASP.NET

Embed an Image in Email using ASP.NET

htmlView = System.Net.Mail.AlternateView.CreateAlternateViewFromString("<html><body " & _

   "style='font-family:Segoe UI, Arial; font-size: 11pt;'><p>" & _

   txtBody.Text.Trim & "</p>'<img src='cid:image1'></body></html>", Nothing, "text/html")

img src="cid:image1"

imageResourceEs.ContentId = "image1"

!Inside the HTML message create the "holders" for the images

img src=

img src="cid:image2"

! Create the resources

Dim lkImage1 As New


Dim lkImage2 As New


! Link the resources

lkImage1.ContentId =

lkImage2.ContentId = "image2"