Occurs when MailBee needs a new socket object for establishing a connection with the POP3 server.
MailBee.NET (in MailBee.NET.dll) Version: 12.3.1 build 666 for .NET 4.5
This event is raised just before MailBee will start making the connection (i.e. before SocketConnected
This lets you specify your own socket object in case if you need some special socket settings.
If you need this, set NewSocket
property to the socket object needed in your event handler.
|It's possible that this event will fire multiple times in case if the host has multple endpoints assigned. For instance, if the first endpoint was IPv6,
the connection could not be made but second endpoint (IPv4) would succeed. On each call of this event handler, your code must supply a new, fresh socket object (otherwise MailBee
will create its own). By default, however, MailBee tries IPv4 addresses first (see PreferIPv4Hosts) so this situation is unlikely to happen.|Examples Imap.SocketCreating
topic contains similar code snippet which shows the idea how to use this event.