Hunny Software Library Reference

Pop3Client.Connect Method

Opens a connection to a POP3 server.

Overload List

Opens a connection to a POP3 server at the default port.

public void Connect(string);

Opens a connection to a POP3 server at a specified port.

public void Connect(string,int);

Remarks

This method opens a connection to the POP3 server on the host at network address address and TCP port port. The address parameter may be either a hostname, such as "pop3.example.com", or an IP address in dotted decimal form, such as "192.168.2.25". The default value for port is 110, the well-known port number for POP3 assigned by the Internet Assigned Numbers Authority (IANA).

If the client fails to connect to the server -- for example, if the host is not found or some other network error occurs -- then Connect throws an instance of Hunny.Mail.Exception. If Connect returns successfully, then you should check the server's reply code, available as the ReplyCode property. The server sends an OK reply code if it is ready to process commands.

You may call the Cancel method from another thread to cancel this operation.

Note: The cancel operation will not have an immediate effect if the connect operation is waiting on a hostname lookup. Failed hostname lookups always time out. (In a future implementation, the library may provide the capability to cancel a hostname lookup, as well.)

See Also

Pop3Client Class | Hunny.Mail Namespace