ImpersonationLogoff Method
Terminates the impersonation mode initiated with LogonAs(String, String, String) call and reverts back to the user account the current thread was created on.

Namespace: MailBee.Security
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public bool Logoff()

Return Value

Type: Boolean
true if succeeded; otherwise, false.
Exceptions
ExceptionCondition
MailBeeInvalidStateExceptionNot impersonated yet because LogonAs(String, String, String) method has not yet been called.
MailBeeImpersonationWin32ExceptionWin32 returned an error on attempt to complete impersonation and ThrowExceptions is true.
See Also