I'm working with the ews-java-api, which I'm using to process incoming emails to specific Exchange accounts, so that I can extract out key information from the email (ie, subject, body, recipient, sender, etc) to forward on to another system through an API call. I'm able to identify the recipient of the email, because it naturally matches the account I'm retrieving new emails from, but I can't seem to identify what alias the sender may have used to send the email.
For example, if I send an email from janedoe@mycompany.com to bobsmith@mycompany.com, I can then grab an email from the "bobsmith" account, and read the subject, body, etc. But if Bob Smith has an alias of, say, "hero@mycompany.com" which goes to his bobsmith account, and Jane Doe emails him to that address, I only see "bobsmith@mycompany.com" as the recipient, not "hero...". I can't seem to find any method calls on the Exchange item (even when cast as an "EmailMessage" type, that allows me to get the address used in the "to:" field.
Does anyone know how to obtain that alias on the received message?