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?