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: 11.2.0 build 590 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