Imap.LoginAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.8816)
LoginAsync(ImapAuthentication, Object)
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified authentication method that does not require credentials (NTLM, GSSAPI or EXTERNAL). Only supported on Windows.
Declaration
public Task LoginAsync(ImapAuthentication method, object state = null)
Parameters
Type | Name | Description |
---|---|---|
ImapAuthentication | method | Authentication method. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
LoginAsync(GssApiProvider, Object)
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified GSSAPI provider. Only supported on Windows and partially on Mono.
Declaration
public Task LoginAsync(GssApiProvider provider, object state = null)
Parameters
Type | Name | Description |
---|---|---|
GssApiProvider | provider | GSSAPI provider. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
Remarks
Only supported on Windows platforms.
LoginAsync(String, String, ImapAuthentication, Object)
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified authentication method.
Declaration
public Task LoginAsync(string userName, string password, ImapAuthentication method, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | userName | User name. |
String | password | Password. |
ImapAuthentication | method | Authentication method. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
LoginAsync(String, ImapAuthentication, Object)
Begins asynchronous Login operation. Authenticates the user to the IMAP server using an OAuth token.
Declaration
public Task LoginAsync(string token, ImapAuthentication method, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | token | Authentication token. |
ImapAuthentication | method | Authentication method (only OAuth 2.0 is supported at the moment). |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
LoginAsync(String, String, Object)
Begins asynchronous Login operation. Authenticates the user to the IMAP server using the specified authentication method.
Declaration
public Task LoginAsync(string userName, string password, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | userName | User name. |
String | password | Password. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task |
Remarks
This method tries to authenticate using the following methods, in this order of preference: CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, ClearText, EXTERNAL, GSSAPI, NTLM. The NTLM, GSSAPI and EXTERNAL methods are only attempted if no other method is available - please use Login(String, String, ImapAuthentication) and specify NTLM, GSSAPI or EXTERNAL directly if you wish to use them.