попробуйте это:
string ext = System.IO.Path.GetExtension(this.imageUpload.PostedFile.FileName);
string low = ext.ToLower();
MemoryStream imgStream = new MemoryStream();
System.Drawing.Image theImage = System.Drawing.Image.FromStream(imageUpload.PostedFile.InputStream);
string filename = imageUpload.PostedFile.FileName;
if (low == ".jpg")
{
theImage.Save(imgStream, System.Drawing.Imaging.ImageFormat.Jpeg);
}
else if (low == ".gif")
{
theImage.Save(imgStream, System.Drawing.Imaging.ImageFormat.Gif);
}
else if (low == ".tif")
{
theImage.Save(imgStream, System.Drawing.Imaging.ImageFormat.Tiff);
}
imgStream.Seek(0L, SeekOrigin.Begin);
if (low == ".jpg")
{
mMailMessage.Attachments.Add(new Attachment(imgStream, filename, System.Net.Mime.MediaTypeNames.Image.Jpeg));
}
else if (low == ".gif")
{
mMailMessage.Attachments.Add(new Attachment(imgStream, filename, System.Net.Mime.MediaTypeNames.Image.Gif));
}
else if (low == ".tif")
{
mMailMessage.Attachments.Add(new Attachment(imgStream, filename, System.Net.Mime.MediaTypeNames.Image.Tiff));
}
делать .png кажется немного хитрее, но по крайней мере это на правильном пути.