We have a pst file that has a single message. This message has an attachment. And this attachment contains a named property.
If we use the FolderInfo.EnumerateMapiMessages or the PersonalStorage.ExtractMessage methods to extract a MapiMessage object, then the resulting object will contain the attachment correctly. But the NamedProperties collection of the attachment will not contain the named property. The property will appear incorrectly in the Properties collection of the attachment object, IsNamed will be true, but there is no way to find the property name. The expected behavior is that we should find it in the NamedProperties collection and we should be able to get its name.
This
behavior is implemented correctly if we read a MSG file via
MapiMessage.FromFile. If we do this, then we find the named property in the
NamedProperties collection with the correct name.
So the problem seems to be only when extracting from PST files.