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




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.
Logs into an IMAP server at a specified port using a username and password and specifying a client interface to use.

Syntax

Visual Basic (Declaration) 
Public Overloads Function 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 _
) As ImapResponse
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 value As ImapResponse
 
value = instance.Login(server, serverPort, client, clientPort, username, password)
C# 
public ImapResponse Login( 
   string server,
   int serverPort,
   string client,
   int clientPort,
   string username,
   string password
)
Managed Extensions for C++ 
public: ImapResponse* Login( 
   string* server,
   int serverPort,
   string* client,
   int clientPort,
   string* username,
   string* password
) 
C++/CLI 
public:
ImapResponse^ Login( 
   String^ server,
   int serverPort,
   String^ client,
   int clientPort,
   String^ username,
   String^ password
) 

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.

Return Value

An ImapResponse object representing the response from the server.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.

Remarks

The Imap.Login method logs into server at the port specified by port with the specified username and password. 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.