MailBee.NET Objects 7.2

MsgConvert.MsgToEml Method (String, String)

Converts Outlook .MSG file (in OLE2 binary format) into .EML file (in RFC822 MIME format).

public void MsgToEml(
   string msgFilename,
   string emlFilename
);

Parameters

msgFilename
The path to the source Outlook .MSG file.
emlFilename
The path to the target .EML file.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException msgFilename or emlFilename is a null reference (Nothing in Visual Basic).
MailBeeException An error occurred during reading, parsing or saving message data.

Example

This sample converts .MSG file into .EML file.

[C#]
// To use the code below, import these namespaces at the top of your code.
using MailBee;
using MailBee.Outlook;

// The actual code (put it into a method of your class).
MsgConvert conv = new MsgConvert();
conv.MsgToEml(@"C:\test.msg", @"C:\test.eml");
[Visual Basic]
' To use the code below, import these namespaces at the top of your code.
Imports MailBee
Imports MailBee.Outlook

' The actual code (put it into a method of your class).
Dim conv As MsgConvert = New MsgConvert
conv.MsgToEml("C:\test.msg", "C:\test.eml")

See Also

MsgConvert Class | MailBee.Outlook Namespace | MsgConvert.MsgToEml Overload List