Hi,
When I generate an email using the above class in .NET and email it, it works fine and I can see the email content.
If I do a Save then the MSG content is Lost
If I save to a FileStream its fine
If I save to a MemoryStream then write those bytes to a Filestream its also fine.
Any ideas why? Or is this some sort of evaluation limitation?
Kind Regards
Clive
emailMessage.Save("c:\\temp\\message.msg", MessageFormat.Msg);
using (FileStream fs = new FileStream("c:\\temp\\messagefromfilestream.msg", FileMode.CreateNew))
{
emailMessage.Save(fs, MessageFormat.Msg);
fs.Flush();
fs.Close();
}
MemoryStream stream = new MemoryStream();
emailMessage.Save(stream, MessageFormat.Msg);
byte[] buffer = stream.GetBuffer();
using (FileStream file = new FileStream("c:\\temp\\messagefromstream.msg", FileMode.CreateNew))
{
file.Write(buffer, 0, buffer.Length);
file.Close();
}
This message was posted using Email2Forum by ShL77.