项目作者: logankp

项目描述 :
A library to handle Microsoft Outlook MSG files
高级语言: C#
项目地址: git://github.com/logankp/Deliverance.git
创建时间: 2015-11-03T21:13:24Z
项目社区:https://github.com/logankp/Deliverance

开源协议:MIT License

下载


Deliverance

Deliverance is a free, open-source library for reading and (eventually) writing .MSG files in the .NET Framework.

It is a 100% managed library that makes it easy to deal with “structured storage” Outlook files without having to use COM libraries.

Status

Deliverance can get the following properties from an MSG file:

  • Recipients
  • From Address and Display name
  • Subject
  • Plain-text body
  • HTML body
  • Attachments

Building

Clone the project, open and build the solution in Visual Studio.

Using

The following code snippet will show an example of how to use this library:

  1. MsgFile msg = new MsgFile();
  2. msg.Load(filePath);
  3. Console.WriteLine("From Address: {0}", msg.Recipients[0].EmailAddress);
  4. Console.WriteLine("From Name: {0}", msg.Recipients[0].DisplayName);
  5. Console.WriteLine("Recipient Type: {0}", msg.Recipients[0].RecipientType);
  6. Console.WriteLine("From: {0} ({1})", msg.FromName, msg.FromAddress);
  7. Console.WriteLine("Subject: {0}", msg.Subject);
  8. Console.WriteLine("Body: {0}", msg.Body);
  9. Console.WriteLine("Attachment name: {0}", msg.Attachments[0].FileName);

Dependencies

The following third-party libraries are used:

License

Deliverance is licensed under the MIT License.