Makes the current thread impersonate the specified user account.
true if succeeded; otherwise, false.
The impersonation lasts until the current thread exits or Logoff method gets called.
| Exception Type | Condition |
|---|---|
| MailBeeInvalidArgumentException | accountName is a null reference (Nothing in Visual Basic) or an empty string. |
| MailBeeImpersonationWin32Exception | Win32 returned an error on attempt to complete impersonation and ThrowExceptions is true. |
Impersonation Class | MailBee.Security Namespace