MsgConvert Class |
Namespace: MailBee.Outlook
The MsgConvert type exposes the following members.
Name | Description | |
---|---|---|
MsgConvert |
Creates an instance of MsgConvert class.
| |
MsgConvert(String) |
Creates and unlocks an instance of MsgConvert class.
|
Name | Description | |
---|---|---|
EmlToMsg(Stream, Stream) |
Converts .EML data (in RFC822 text format) into a stream in Outlook .MSG (OLE2) format with 8-bit encoding.
| |
EmlToMsg(String, String) |
Converts .EML data (in RFC822 text format) into a file in Outlook .MSG (OLE2) format with 8-bit encoding.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MailMessageToMsg(MailMessage, Stream) |
Saves the specified MailMessage into a stream in Outlook .MSG (OLE2) format.
| |
MailMessageToMsg(MailMessage, String) |
Saves the specified MailMessage as Outlook .MSG file.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MsgToEml(Stream, Stream) |
Converts Outlook .MSG data (in OLE2 binary format) into .EML data (in RFC822 MIME format).
| |
MsgToEml(String, String) |
Converts Outlook .MSG file (in OLE2 binary format) into .EML file (in RFC822 MIME format).
| |
MsgToMailMessage(Stream) |
Parses Outlook .MSG data stream into MailMessage object.
| |
MsgToMailMessage(String) |
Parses Outlook .MSG file into MailMessage object.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HtmlToRtfMethod |
Gets or sets which HTML-to-RTF conversion method to use when making .MSG out of .EML source.
| |
LicenseKey | Obsolete.
Assigns the license key.
| |
MsgAsDraft |
Gets or sets whether the resulting .MSG message should be saved as "Draft" (editable) or "Sent" (read-only).
| |
MsgAsUnicode |
Gets or sets whether string values during .EML-to-.MSG transformation will be saved as Unicode (allows using international characters).
| |
MsgIsFromMe |
Gets or sets whether MSGFLAG_FROMME flag will set in the resuling .MSG message.
| |
OnByteToStringConversion |
Gets or sets the application-supplied callback MailBee will execute in order to convert bytes to string when making .EML from .MSG source.
| |
OnHtmlToRtfConversion |
Gets or sets the application-supplied callback MailBee will execute in order to convert HTML-to-RTF when making .MSG out of .EML source.
| |
PreferAddressesFromInternetHeaders |
Gets or sets whether From/To/CC/BCC addresses must be loaded from Internet headers of the .MSG message.
| |
PreferRtfBodyToHtml |
Gets or sets whether the HTML body of the resulting .EML should be taken from RTF part (instead of HTML part) of the source .MSG message, if it has both RTF and HTML part.
| |
RtfInEmlMethod |
Gets or sets if RTF text body from .MSG message should be added as an attachment or as a body part into the resulting .EML message, or not added at all.
| |
TrialDaysLeft |
Gets the number of days left to the date of the trial license key expiration.
|
Prior to creating instances of this class, the correct license key must be set. See MailBee.Global.LicenseKey property for details.
Note |
---|
This class can only deal with OLE2 .MSG files. XML mail messages (can be created by Outlook 2007 and higher) are not supported. |
Note |
---|
This sample shows how to use streams and MailMessage objects within the conversion (this also allows you to modify the resulting mail message prior to saving it into a file. If you only need to convert .MSG file into .EML (or vice versa), you can simply use MsgToEml(String, String) or EmlToMsg(String, String) methods. |
// To use the code below, import these namespaces at the top of your code. using System.IO; using MailBee.Outlook; using MailBee.Mime; // The actual code (put it into a method of your class). FileStream fs = new FileStream(@"C:\Mail\test.msg", FileMode.Open); MsgConvert conv = new MsgConvert(); MailMessage msg = conv.MsgToMailMessage(fs); fs.Close(); msg.SaveMessage(@"C:\Mail\test.eml");