GroupDocs.Metadata for .NET 25.3 Release Notes

Major Features

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

  • Modify MSG fields
  • Support .ogg format

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
METADATANET-4083Support OGG format.New Feature
METADATANET-4124Add more properties to .msg format.New Feature

Public API and Backward Incompatible Changes

Public API changes

New properties has been added to the GroupDocs.Metadata.Formats.Email.MsgPackage class

New classes OggPackage OggRootPackage OggUserComment has been added to the OGG namespace

Use cases

Modify MSG fields and attachments

var name = "tree.jpg";
var attachmentPath = Constants.AttachmentJpg;
byte[] bytes;
using (Metadata metadata = new Metadata("input.msg"))
{
	var root = metadata.GetRootPackage<MsgRootPackage>();
	using (FileStream fsSource = new FileStream(attachmentPath,
			   FileMode.Open, FileAccess.Read))
	{
		bytes = new byte[fsSource.Length];
		var attachments = new MsgAttachmentPackage[1];
		attachments[0] = new MsgAttachmentPackage(name, bytes);
		root.EmailPackage.Attachments = attachments;
		
		Console.WriteLine(root.EmailPackage.SenderSmtpAddress);
	}
	metadata.Save();
}

Read metadata from .ogg file

using (Metadata metadata = new Metadata("input.ogg"))
{
    var root = metadata.GetRootPackage<OggRootPackage>();

    Console.WriteLine(root.OggPackage.Copyright);
    Console.WriteLine(root.OggPackage.Date);
    foreach (var comment in root.OggPackage.OggUserComments)
    {
        Console.WriteLine(comment.Header);
        Console.WriteLine(comment.Value);
    }
}