I have an image stored in sql server. I want to retrieve the image and place it in a MailMessage object, not as an attachment file, but as part of the html body.
I found many samples using local image file, but I have not found any using an image from a database.
Anyone know how I can do this in vb.net?
Thank you in advance!
Javier
You have to add the image from the database as a LinkedResource.
When you retrieve the image as bytes from the database, you can add the LinkedResource using a stream; by creating a memorystream from the bytes.
Code in C#, but I think you should be able to convert this to VB.Net