Occurs when the connection with the server is successfully established.
Namespace: MailBee.Pop3MailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax Remarks This event indicates successful completion of the connection procedure, while
SocketConnected event (occurs before
Connected) indicates
the connection request from MailBee was accepted by the server, and the POP3
connection procedure will now begin.
Examples This sample uses
Connected event to report
the successful connection status into console.
using System;
using MailBee;
using MailBee.Pop3Mail;
class Sample
{
private static void OnConnected(object sender, ConnectedEventArgs e)
{
Console.WriteLine("Successfully connected to the server.");
}
static void Main(string[] args)
{
Pop3 pop = new Pop3();
pop.Connected += new ConnectedEventHandler(OnConnected);
pop.Connect("mail.domain.com");
pop.Disconnect();
}
}
Imports System
Imports MailBee
Imports MailBee.Pop3Mail
Class Sample
Private Shared Sub OnConnected(ByVal sender As Object, ByVal e As ConnectedEventArgs)
Console.WriteLine("Successfully connected to the server.")
End Sub
Shared Sub Main(ByVal args As String())
Dim pop As New Pop3
AddHandler pop.Connected, AddressOf OnConnected
pop.Connect("mail.domain.com")
pop.Disconnect()
End Sub
End Class
See Also