メールにjpegを添付する次のコードがあります。
System.Net.Mime.ContentType contentType = new System.Net.Mime.ContentType();
contentType.MediaType = System.Net.Mime.MediaTypeNames.Image.Jpeg;
contentType.Name = "screen";
Attachment screenCapture = new Attachment(imageStream, contentType);
//this next line works, I checked the image on the hard drive so I know the jpeg is ok
File.WriteAllBytes("c:\\somecoolimage.jpeg", imageStream.ToArray());
mail.Attachments.Add(screenCapture);
smtp.Send(mail);
ただし、メールに添付ファイルが含まれているメールを受け取った場合、そのメールは0バイトです。私はここで何が間違っているのですか?