Hello
When I use the following (stripped) lines of code to load an image into an SMTP HTML email, the image does not appear in the main window of my inbox (I have tried it using an Outlook email account and Yahoo email account):
Code:
Dim mimeType As ContentType = New ContentType("text/html")
Dim HtmlMessage As AlternateView = AlternateView.CreateAlternateViewFromString("<body style=""background:url('cid:dimaHeader') no-repeat;"">'font-family:candara'> To reset your password.....</body>", Nothing, "text/html")
Dim Logo As New LinkedResource(Server.MapPath("~/Images/dimaHeader.jpg"), "image/jpeg") 'embedded image
Logo.ContentId = "dimaHeader"
myMessage.AlternateViews.Add(PlainMessage)
myMessage.AlternateViews.Add(HtmlMessage)
The image is stored in Solution Explorer (Visual Studio) as are all the images on the Web site. I am just wondering, have I got this part right?
Code:
Dim HtmlMessage As AlternateView = AlternateView.CreateAlternateViewFromString("<body style=""background:url('cid:dimaHeader') no-repeat;"">
Thank you