Adding a jpeg picture to a mail message using
LinkedResource resPic = new LinkedResource(@"path\Pic.jpg", MediaTypeNames.Image.Jpeg);
works well, but I need to add the picture from the project Properties.Resources.Pic.
How can that be done ?
Adding a jpeg picture to a mail message using
LinkedResource resPic = new LinkedResource(@"path\Pic.jpg", MediaTypeNames.Image.Jpeg);
works well, but I need to add the picture from the project Properties.Resources.Pic.
How can that be done ?
Copyright © 2021 Jogjafile Inc.
One approach would be to save it to disk first:
and then when you're done with the whole process, clean up the file:
I'm not guaranteeing that you'll be able to cleanup the file in the same method, so
path
may need to be a more accessible variable, but you can work out those details.