PowerTCP Mail for .NET
BeginLogin(String,String,String,Object) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Imap Class > BeginLogin Method : BeginLogin(String,String,String,Object) Method




server
The hostname or dot address of the IMAP server.
username
The account username.
password
The account password.
state
User state information.
Begins to asynchronously log into an IMAP server using a username and password.Begins to asynchronously log into an IMAP server using a username and password.

Syntax

Visual Basic (Declaration) 
Public Overloads Function BeginLogin( _
   ByVal server As String, _
   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 username As String
Dim password As String
Dim state As Object
Dim value As IAsyncResult
 
value = instance.BeginLogin(server, username, password, state)
C# 
public IAsyncResult BeginLogin( 
   string server,
   string username,
   string password,
   object state
)
Managed Extensions for C++ 
public: IAsyncResult* BeginLogin( 
   string* server,
   string* username,
   string* password,
   Object* state
) 
C++/CLI 
public:
IAsyncResult^ BeginLogin( 
   String^ server,
   String^ username,
   String^ password,
   Object^ state
) 

Parameters

server
The hostname or dot address of the IMAP server.
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.An IAsyncResult that represents the asynchronous operation, which could still be pending.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.
System.InvalidOperationExceptionBeginXXX method used without providing an EndXXX event handler.
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.
System.InvalidOperationExceptionBeginXXX method used without providing an EndXXX event handler.

Remarks

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.

The Imap.BeginLogin method begins to asynchronously log into server 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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.