Search code examples
c#visual-studio-2010emailembedded-resource

How to insert image from Image Resource File (not from the file system) in email?


I'm trying to insert a signature image into emails sent from my application. I know how to insert an image using LinkedResource and AlternateView, but those use a file from the file system. I'm trying to use a Resource File (e.g. Properties.Resources.myLogo). How does one achieve this?


Solution

  • You need to load the image from a resource stream. This stackoverflow post should explain how to do it.