Hello,
We are not sure about Exchange 2007, but in Exchange 2010, you can impersonate a user by using a mechanism specified by IMAP protocol's AUTHENTICATE PLAIN
command.
A corresponding Rebex IMAP code involves constructing a username string by combining the two different user names:
Imap imap = new Imap();
imap.Connect(...);
// credentials for authentication
string loginUserName = ...;
string password = ...;
// user name of impersonated user
string mailboxUserName = ...;
// construct a username for impersonation
string userName = mailboxUserName + "\0" + loginUserName;
// authenticate to the server
imap.Login(userName, password, ImapAuthentication.Plain);
This works with Exchange 2010. If you test it with Exchange 2007, please let us know whether it works as well!