ImapDisconnect Method
Disconnects from the IMAP4 server and releases any used resources.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public bool Disconnect()

Return Value

Type: Boolean
true if the method succeeds; otherwise, false.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
Remarks
Unlike POP3, where all the messages marked as deleted are expunged when Disconnect method is called, the IMAP4 protocol requires the client to explicitly expunge messages marked as deleted using Close(Boolean) or Expunge(String, Boolean) method call.
Examples
This sample connects to the IMAP4 server and then disconnects.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.ImapMail;

// The actual code (put it into a method of your class).
Imap imp = new Imap();
imp.Connect("mail.domain.com");
imp.Disconnect();
See Also