Posted on: 4/12/2011 2:01:38 AM | Views : 405

I am programatically generating emails using Net.Mail.SmtpClient. I want to get some images within the htm, but it comes thru as a dowload file.
Here is the code.
 htmlView = System.Net.Mail.AlternateView.CreateAlternateViewFromString("<image src=cid:HDIImage><br/><br/>" & TempString, Nothing, "text/html")

        'Add image to HTML version
            Dim imageResource As New System.Net.Mail.LinkedResource("..\App_Themes\Theme1\EmailHeader.jpg")

        imageResource.ContentId = "HDIImage"
        imageResource.TransferEncoding = System.Net.Mime.TransferEncoding.Base64
        htmlView.LinkedResources.Add(imageResource)
NetMail.AlternateViews.Add(htmlView)
        NetM ...

Go to the complete details ...