Getting the Actual Email Address when message.getSenderAddressType() is EX

With:
for (int i = 0; i < messageInfoCollection.size(); i++) {
MessageInfo messageInfo = (MessageInfo) messageInfoCollection.get_Item(i);
MapiMessage message = input.extractMessage(messageInfo);
message.setMessageFlags(MapiMessageFlags.MSGFLAG_READ);
String senderEmail = message.getSenderEmailAddress();
}

When message.getSenderAddressType() yields EX, the value of message.getSenderEmailAddress() is in the format of:
/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=695B1D24DDD44D0DA6BA92B1A3BCA2E0-USER

Instead of the expected SMTP Address of:
user@domain.com

Is there some other property or way I can pull the actual email address?

I figured it out:

if(senderEmail.indexOf("@") < 0){
                senderEmail = message.getProperty(PropertyDescriptor.parse("Tag:'':0x5D0A:31")).getString();
}

@tembenite

It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Email, we will be happy to help you.