Sending System.Drawing.Bitmap in mail body
-
Is it possible to put a System.Drawing.Bitmap object in the body of an email? I don't want to save the Bitmap as a file to send as an attachment. For example, if I create a new bitmap:
Bitmap bmp = new Bitmap(320, 240);
Is it possible to send this Bitmap in an email message without saving this Bitmap first? Thanks, AshishTime flies like an arrow; Fruit flies like a banana. Ashish Derhgawen - http://ashishrd.blogspot.com[^]
-
Is it possible to put a System.Drawing.Bitmap object in the body of an email? I don't want to save the Bitmap as a file to send as an attachment. For example, if I create a new bitmap:
Bitmap bmp = new Bitmap(320, 240);
Is it possible to send this Bitmap in an email message without saving this Bitmap first? Thanks, AshishTime flies like an arrow; Fruit flies like a banana. Ashish Derhgawen - http://ashishrd.blogspot.com[^]
-
You don't have to save it to a file to get the data. Create a MemoryStream to save it to, then you can get the data from the MemoryStream as a byte array.
--- b { font-weight: normal; }
Thanks Guffa! I never thought of that.:)
Time flies like an arrow; Fruit flies like a banana. Ashish Derhgawen - http://ashishrd.blogspot.com[^]