Write .msg file where input is mime Contents using chilkatDotNet.dll

225 Views Asked by At

I had mime contents of mail from gmail and now i want to create .msg file using chilkat and store that contents to .msg file. How could i do that using chilkat any idea.

MsgFilePath = System.IO.Path.Combine(Path, msgFileName + ".msg");
string mimeFile = System.Text.Encoding.ASCII.GetString(mail.MIMEContent);
           success = ObjEmail.SetFromMimeText(mimeFile);           
            if (success)
            {
                byte[] mimeContents = ObjEmail.GetMimeBinary();
                File.WriteAllBytes(MsgFilePath, mimeContents);
            }
0

There are 0 best solutions below