| Visual Basic (Declaration) | |
|---|---|
Public Overloads Sub Login( _ ByVal server As String, _ ByVal serverPort As Integer, _ ByVal client As String, _ ByVal clientPort As Integer, _ ByVal username As String, _ ByVal password As String, _ ByVal loginMethod As PopLoginMethod _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Pop Dim server As String Dim serverPort As Integer Dim client As String Dim clientPort As Integer Dim username As String Dim password As String Dim loginMethod As PopLoginMethod instance.Login(server, serverPort, client, clientPort, username, password, loginMethod) | |
| C# | |
|---|---|
public void Login( string server, int serverPort, string client, int clientPort, string username, string password, PopLoginMethod loginMethod ) | |
| Managed Extensions for C++ | |
|---|---|
public: void Login( string* server, int serverPort, string* client, int clientPort, string* username, string* password, PopLoginMethod loginMethod ) | |
| C++/CLI | |
|---|---|
public: void Login( String^ server, int serverPort, String^ client, int clientPort, String^ username, String^ password, PopLoginMethod loginMethod ) | |
Parameters
- server
- The POP server to log in to.
- serverPort
- The port to attempt to log in to.
- client
- The client hostname or address when a specific interface binding is desired
- clientPort
- The client port when a specific local port is desired
- username
- Username used to log in to the POP server.
- password
- Password used to log in to the POP server.
- loginMethod
- Login method to use.
| Exception | Description |
|---|---|
| Dart.PowerTCP.Mail.ProtocolException | Bad POP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
| System.IO.IOException | The filename, directory name, or volume label syntax is incorrect. |
| System.ArgumentException | A required argument contains invalid characters, is empty, or contains only white spaces. |
This method represents logging into a POP server using advanced options. Upon logging in, the Pop.PopMessage property will be populated with the new messages available on the POP server. The Pop component can be configured to populate the Pop.Message property with message data in one of three ways upon login:
- If Pop.AutoGet = MessageSection.None the Pop.Messages collection will be populated with MessageStream objects containing the minimal data returned from the server about the message (id, unique id, and size of the message).
- If Pop.AutoGet = MessageSection.Complete then the Pop.Messages collection will be populated with MessageStream objects containing the full message.
- If Pop.AutoGet = MessageSection.Header then the Pop.Messages collection will be populated with MessageStream objects containing only the header.
To log in to the POP server asynchronously, use Pop.BeginLogin.
Target Platforms: Microsoft .NET Framework 2.0