GroupDocs.Metadata for .NET 25.4 Release Notes

Major Features

There are the following features, enhancements, and fixes in this release:

  • Develop new method for .msg format.
  • Improve work with .msg attachments

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
METADATANET-4127Develop GetPropertyString method for .msg format.New Feature
METADATANET-4128Improve work with .msg attachments.New Feature

Public API and Backward Incompatible Changes

Public API changes

New enum MsgKnownProperties has been added to the GroupDocs.Metadata.Formats.Email.Msg namespace

New method GetString has been added to the MsgRootPackage namespace

Use cases

Get property string method for MSG

var name = "tree.jpg";
var attachmentPath = Constants.AttachmentJpg;
byte[] bytes;
using (Metadata metadata = new Metadata("input.msg"))
{
	var root = metadata.GetRootPackage<MsgRootPackage>();
	root.GetString(MsgKnownProperties.PR_DISPLAY_NAME);
}

Work with .msg attachments

using (Metadata metadata = new Metadata("input.msg"))
{
     MsgRootPackage root = metadata.GetRootPackage<MsgRootPackage>();
     MsgPackage msg = root.EmailPackage;
	 var bytes = File.ReadAllBytes("attachment.jpg");
	 var displayName = "attachment";
     var list = msg.Attachments.ToList();
	 list.Add(new MsgAttachmentPackage(name, bytes));
	 list.Remove(msg.Attachments[0]);
	 msg.Attachments = list.ToArray();

     metadata.Save();
}