Disconnects from the IMAP4 server and releases any used resources.
Namespace: MailBee.ImapMailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax Public Function Disconnect As Boolean
Return Value
Type:
Booleantrue if the method succeeds; otherwise,
false.
Exceptions 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.
using MailBee;
using MailBee.ImapMail;
Imap imp = new Imap();
imp.Connect("mail.domain.com");
imp.Disconnect();
Imports MailBee
Imports MailBee.ImapMail
Dim imp As New Imap
imp.Connect("mail.domain.com")
imp.Disconnect()
See Also