Méthode | Description | |
---|---|---|
Authenticate ( ICredentials credentials, |
Authenticates using the supplied credentials. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
Authenticate ( Portable.Text.Encoding encoding, ICredentials credentials, |
Authenticates using the supplied credentials. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
Authenticate ( Portable.Text.Encoding encoding, string userName, string password, |
Authenticates using the specified user name and password. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
Authenticate ( string userName, string password, |
Authenticates using the specified user name and password. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
AuthenticateAsync ( ICredentials credentials, |
Asynchronously authenticates using the supplied credentials. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
AuthenticateAsync ( Portable.Text.Encoding encoding, ICredentials credentials, |
Asynchronously authenticates using the supplied credentials. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
AuthenticateAsync ( Portable.Text.Encoding encoding, string userName, string password, |
Asynchronously authenticates using the specified user name and password. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
AuthenticateAsync ( string userName, string password, |
Asynchronously authenticates using the specified user name and password. If the server supports one or more SASL authentication mechanisms, then the SASL mechanisms that both the client and server support are tried in order of greatest security to weakest security. Once a SASL authentication mechanism is found that both client and server support, the credentials are used to authenticate. If the server does not support SASL or if no common SASL mechanisms can be found, then the default login command is used as a fallback. |
|
Connect ( |
Establish a connection to the specified mail server. Establishes a connection to the specified mail server. |
|
Connect ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
Establish a connection to the specified mail server. Establishes a connection to the specified mail server. |
|
Connect ( string host, int port, bool useSsl, |
Establish a connection to the specified mail server. Establishes a connection to the specified mail server. The useSsl argument only controls whether or not the client makes an SSL-wrapped connection. In other words, even if the useSsl parameter is To disable all use of SSL/TLS, use the Connect(string,int,MailKit.Security.SecureSocketOptions,System.Threading.CancellationToken) overload with a value of |
|
ConnectAsync ( |
Asynchronously establish a connection to the specified mail server. Asynchronously establishes a connection to the specified mail server. |
|
ConnectAsync ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
Asynchronously establish a connection to the specified mail server. Asynchronously establishes a connection to the specified mail server. |
|
ConnectAsync ( string host, int port, bool useSsl, |
Asynchronously establish a connection to the specified mail server. Asynchronously establishes a connection to the specified mail server. The useSsl argument only controls whether or not the client makes an SSL-wrapped connection. In other words, even if the useSsl parameter is To disable all use of SSL/TLS, use the ConnectAsync(string,int,MailKit.Security.SecureSocketOptions,System.Threading.CancellationToken) overload with a value of |
|
DefaultServerCertificateValidationCallback ( object sender, |
The default server certificate validation callback used when connecting via SSL or TLS. The default server certificate validation callback considers self-signed certificates to be valid so long as the only error in the certificate chain is an untrusted root. |
|
Disconnect ( bool quit, |
Disconnects the service. If quit is |
|
DisconnectAsync ( bool quit, |
Asynchronously disconnects the service. If quit is |
|
Dispose ( ) : void |
Releases all resource used by the MailService object. Call Dispose() when you are finished using the MailService. The Dispose() method leaves the MailService in an unusable state. After calling Dispose(), you must release all references to the MailService so the garbage collector can reclaim the memory that the MailService was occupying. |
|
NoOp ( |
Pings the mail server to keep the connection alive. Mail servers, if left idle for too long, will automatically drop the connection. |
|
NoOpAsync ( |
Asynchronously pings the mail server to keep the connection alive. Mail servers, if left idle for too long, will automatically drop the connection. |
Méthode | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the MailService and optionally releases the managed resources. Releases the unmanaged resources used by the MailService and optionally releases the managed resources. |
|
MailService ( ) : System |
Initializes a new instance of the MailKit.MailService class. Initializes a new instance of the MailKit.MailService class. |
|
MailService ( IProtocolLogger protocolLogger ) : System |
Initializes a new instance of the MailKit.MailService class. Initializes a new instance of the MailKit.MailService class. |
|
OnAuthenticated ( string message ) : void |
Raise the authenticated event. Raises the authenticated event. |
|
OnConnected ( ) : void |
Raise the connected event. Raises the connected event. |
|
OnDisconnected ( ) : void |
Raise the disconnected event. Raises the disconnected event. |
public Authenticate ( ICredentials credentials, |
||
credentials | ICredentials | The user's credentials. |
cancellationToken | The cancellation token. | |
Résultat | void |
public abstract Authenticate ( Portable.Text.Encoding encoding, ICredentials credentials, |
||
encoding | Portable.Text.Encoding | The encoding to use for the user's credentials. |
credentials | ICredentials | The user's credentials. |
cancellationToken | The cancellation token. | |
Résultat | void |
public Authenticate ( Portable.Text.Encoding encoding, string userName, string password, |
||
encoding | Portable.Text.Encoding | The encoding to use for the user's credentials. |
userName | string | The user name. |
password | string | The password. |
cancellationToken | The cancellation token. | |
Résultat | void |
public Authenticate ( string userName, string password, |
||
userName | string | The user name. |
password | string | The password. |
cancellationToken | The cancellation token. | |
Résultat | void |
public AuthenticateAsync ( ICredentials credentials, |
||
credentials | ICredentials | The user's credentials. |
cancellationToken | The cancellation token. | |
Résultat | Task |
public AuthenticateAsync ( Portable.Text.Encoding encoding, ICredentials credentials, |
||
encoding | Portable.Text.Encoding | The encoding to use for the user's credentials. |
credentials | ICredentials | The user's credentials. |
cancellationToken | The cancellation token. | |
Résultat | Task |
public AuthenticateAsync ( Portable.Text.Encoding encoding, string userName, string password, |
||
encoding | Portable.Text.Encoding | The encoding to use for the user's credentials. |
userName | string | The user name. |
password | string | The password. |
cancellationToken | The cancellation token. | |
Résultat | Task |
public AuthenticateAsync ( string userName, string password, |
||
userName | string | The user name. |
password | string | The password. |
cancellationToken | The cancellation token. | |
Résultat | Task |
public Connect ( |
||
uri | The server URI. | |
cancellationToken | The cancellation token. | |
Résultat | void |
public abstract Connect ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
||
host | string | The host name to connect to. |
port | int | The port to connect to. If the specified port is |
options | SecureSocketOptions | The secure socket options to when connecting. |
cancellationToken | The cancellation token. | |
Résultat | void |
public Connect ( string host, int port, bool useSsl, |
||
host | string | The host to connect to. |
port | int | The port to connect to. If the specified port is |
useSsl | bool | |
cancellationToken | The cancellation token. | |
Résultat | void |
public ConnectAsync ( |
||
uri | The server URI. | |
cancellationToken | The cancellation token. | |
Résultat | Task |
public ConnectAsync ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
||
host | string | The host name to connect to. |
port | int | The port to connect to. If the specified port is |
options | SecureSocketOptions | The secure socket options to when connecting. |
cancellationToken | The cancellation token. | |
Résultat | Task |
public ConnectAsync ( string host, int port, bool useSsl, |
||
host | string | The host to connect to. |
port | int | The port to connect to. If the specified port is |
useSsl | bool | |
cancellationToken | The cancellation token. | |
Résultat | Task |
public static DefaultServerCertificateValidationCallback ( object sender, |
||
sender | object | The object that is connecting via SSL or TLS. |
certificate | The server's SSL certificate. | |
chain | The server's SSL certificate chain. | |
sslPolicyErrors | SslPolicyErrors | The SSL policy errors. |
Résultat | bool |
public abstract Disconnect ( bool quit, |
||
quit | bool | If set to |
cancellationToken | The cancellation token. | |
Résultat | void |
public DisconnectAsync ( bool quit, |
||
quit | bool | If set to |
cancellationToken | The cancellation token. | |
Résultat | Task |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
Résultat | void |
protected MailService ( IProtocolLogger protocolLogger ) : System | ||
protocolLogger | IProtocolLogger | The protocol logger. |
Résultat | System |
public abstract NoOp ( |
||
cancellationToken | The cancellation token. | |
Résultat | void |
public NoOpAsync ( |
||
cancellationToken | The cancellation token. | |
Résultat | Task |
protected OnAuthenticated ( string message ) : void | ||
message | string | The notification sent by the server when the client successfully authenticates. |
Résultat | void |