public class MsgRootPackage extends EmailRootPackage
Represents the root package allowing working with metadata in an MSG email message.
Learn more
This code sample shows how to extract metadata from an MSG message.
try (Metadata metadata = new Metadata(Constants.InputMsg)) { MsgRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getMsgPackage().getSender()); System.out.println(root.getMsgPackage().getSubject()); for (String recipient : root.getMsgPackage().getRecipients()) { System.out.println(recipient); } for (String attachedFileName : root.getMsgPackage().getAttachedFileNames()) { System.out.println(attachedFileName); } for (MetadataProperty header : root.getMsgPackage().getHeaders()) { System.out.println(String.format("%s = %s", header.getName(), header.getValue())); } System.out.println(root.getMsgPackage().getBody()); System.out.println(root.getMsgPackage().getDeliveryTime()); // ... }
| Modifier and Type | Method and Description |
|---|---|
MsgPackage |
getMsgPackage()
Gets the MSG metadata package.
|
String |
getString(com.groupdocs.metadata.core.MsgKnownProperties tag)
Gets the string value of the property specified by tag.
|
clearAttachments, getEmailPackagecopyTo, getFileType, isLicensed, sanitizeaddProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, setProperties, updatePropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic final MsgPackage getMsgPackage()
Gets the MSG metadata package.
public final String getString(com.groupdocs.metadata.core.MsgKnownProperties tag)
Gets the string value of the property specified by tag.
tag - The value from MsgKnownProperties enum.Copyright © 2026. All rights reserved.