Sample code for 30+ languages & platforms
.NET Core C#

Load MIME Object from Email Object

See more Email Object Examples

Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)

Chilkat .NET Core C# Downloads

.NET Core C#
bool success = false;

Chilkat.Email email = new Chilkat.Email();
success = email.LoadEml("qa_data/eml/sample.eml");

// Write the full MIME of the email to a StringBuilder.
Chilkat.StringBuilder sbMime = new Chilkat.StringBuilder();
email.GetMimeSb(sbMime);

// Load the MIME object from the StringBuilder
Chilkat.Mime mime = new Chilkat.Mime();
success = mime.LoadMimeSb(sbMime);

Debug.WriteLine(mime.GetMime());