| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function BeginLogin( _ 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 state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Imap 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 state As Object Dim value As IAsyncResult value = instance.BeginLogin(server, serverPort, client, clientPort, username, password, state) | |
| C# | |
|---|---|
public IAsyncResult BeginLogin( string server, int serverPort, string client, int clientPort, string username, string password, object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginLogin( string* server, int serverPort, string* client, int clientPort, string* username, string* password, Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginLogin( String^ server, int serverPort, String^ client, int clientPort, String^ username, String^ password, Object^ state ) | |
Parameters
- server
- The hostname or dot address of the IMAP server.
- serverPort
- The port to connect to. This defaults to the well-known IMAP port of 143 but can be changed for non-standard implementations.
- 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
- The account username.
- password
- The account password.
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| Exception | Description |
|---|---|
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
| System.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
The Imap.BeginLogin method begins to asynchronously log into server at the port specified by port with the specified username and password. Upon completion of this operation the Imap.EndLogin event is raised. If Imap.AutoList is true, Imap.Login will also perform a list of all top-level mailboxes and will set Imap.CurrentMailbox to the Mailbox object representing "INBOX", if one exists.
Target Platforms: Microsoft .NET Framework 2.0