We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

MailMessage and PR_MESSAGE_CLASS_W property

Is there was to tell if an email has this property? We use the MailMessage class to read them and access all other properties, but don’t see this one anywhere. Thanks.

@Dan_Anderson,
Thank you for posting the query. I will answer you as soon as possible.

@Dan_Anderson,
You should use MapiMessage class to check email MAPI properties. You can convert your MailMessage object to MapiMessage object as shown below:

var mapiMessage = MapiMessage.FromMailMessage(mailMessage, MapiConversionOptions.UnicodeFormat);

or load the email message to MapiMessage object directly.

Then you can check the PR_MESSAGE_CLASS_W property like this:

long propertyTag = MapiPropertyTag.PR_MESSAGE_CLASS_W;
if (mapiMessage.Properties.ContainsKey(propertyTag))
{
    MapiProperty mapiProperty = mapiMessage.Properties[propertyTag];
    // some code...
}

Documents: Working with MAPI Properties