My earlier problem about catching an email message just after it has sent was resolved by using the Items.ItemAdd
event handler of the Sent Items folder. This works fine when I don't change the sender mailbox. But if I change it by selecting some other account from the dropdown list of the sender on the interface shown by mailItem.Display(true);
, then the sent message lands in the "sent items" folder of this other account, but
Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail);
doesn't change accordingly, so in this way I can't catch the message. How could I get the "sent items" folder of the selected (not default) sender? (an acceptable workaround would be to change the default mailbox, but I also don't know how to do this).