Created
October 29, 2024 15:41
-
-
Save documentprocessing/c6c14df19adc9e7e3778e6b29c03f35a to your computer and use it in GitHub Desktop.
Read Outlook MSG properties using MSGReader API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var msg = new MsgReader.Outlook.Storage.Message("testfile.msg")) | |
{ | |
var from = msg.Sender; | |
var sentOn = msg.SentOn; | |
var recipientsTo = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.To, false, false); | |
var recipientsCc = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.Cc, false, false); | |
var subject = msg.Subject; | |
var htmlBody = msg.BodyHtml; | |
// etc... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment