Pop3SocketCreating Event
Occurs when MailBee needs a new socket object for establishing a connection with the POP3 server.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
public event SocketCreatingEventHandler SocketCreating


Type: MailBeeSocketCreatingEventHandler
This event is raised just before MailBee will start making the connection (i.e. before SocketConnected event). 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.
Note Note
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.
Imap.SocketCreating topic contains similar code snippet which shows the idea how to use this event.
See Also