0
votes

Consider this situation: in my outlook I have two accounts [email protected] (default) and [email protected] . If someone sends one e-mail message to booth my addresses I’ll end up with two email in my outlook inbox. Is it possible (using VSTO for Outlook) to differentiate which email message was received for gmail.com domain and which for yahoo.com? I have this

String emailAddress = Globals.ThisAddIn.Application.Session.CurrentUser.Address;

but it's always [email protected]. If I iterate Outlook.MailItem.Recipients I’ll get booth my email address and can’t resolve which of them is true recipient.

1
Why do you need to differentiate them if you have got the single delivery store?Eugene Astafiev

1 Answers

3
votes

Use the MailItem.SendUsingAccount property - it will point to the account used to receive the message.