I\'m having some difficulty embedding an image from the Properties.Resources to a MailMessage, currently the image does not show in the email i receive.
I have succe
Ok i have solved the problem.
Instead of using the BitMap save method I converted the BitMap to Byte[] and gave the memory stream the Byte[]
Did not work :
b.Save(logo, ImageFormat.Jpeg);
Did Work:
Bitmap b = new Bitmap(Properties.Resources.companyLogo);
ImageConverter ic = new ImageConverter();
Byte [] ba = (Byte[]) ic.ConvertTo(b,typeof(Byte[]));
MemoryStream logo = new MemoryStream(ba);
I think it has something to do with the Bitmap.Save method, in the MSDN lib it mentioned that the stream has to have an offset of 0.