Свойство | Тип | Описание | |
---|---|---|---|
AddUnique | void | ||
Bdat | void | ||
CheckDisposed | void | ||
ComputeDefaultValues | void | ||
Data | void | ||
Disconnect | void | ||
Ehlo | void | ||
FlushCommandQueue | void | ||
GetMessageRecipients | IList |
||
GetMessageSender | MimeKit.MailboxAddress | ||
GetNotifyString | string | ||
MailFrom | void | ||
ProcessMailFromResponse | void | ||
ProcessRcptToResponse | bool | ||
QueueCommand | void | ||
RcptTo | void | ||
ReplayConnect | void | ||
Reset | void | ||
Send | void | ||
SendCommand | MailKit.Net.Smtp.SmtpResponse | ||
SendEhlo | MailKit.Net.Smtp.SmtpResponse | ||
ValidateRemoteCertificate | bool |
Метод | Описание | |
---|---|---|
Authenticate ( Portable.Text.Encoding encoding, ICredentials credentials, |
Authenticates using the supplied credentials. If the SMTP server supports authentication, 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, on the other hand, authentication is not supported by the SMTP server, then this method will throw System.NotSupportedException. The Capabilities property can be checked for the SmtpCapabilities.Authentication flag to make sure the SMTP server supports authentication before calling this method. |
|
Connect ( |
Establish a connection to the specified SMTP or SMTP/S server using the provided socket. Establishes a connection to the specified SMTP or SMTP/S server. If the port has a value of If the options has a value of SecureSocketOptions.Auto, then the port is used to determine the default security options. If the port has a value of Once a connection is established, properties such as AuthenticationMechanisms and Capabilities will be populated. |
|
Connect ( string host, int port, SecureSocketOptions options = SecureSocketOptions.Auto, |
Establishes a connection to the specified SMTP or SMTP/S server. Establishes a connection to the specified SMTP or SMTP/S server. If the port has a value of If the options has a value of SecureSocketOptions.Auto, then the port is used to determine the default security options. If the port has a value of Once a connection is established, properties such as AuthenticationMechanisms and Capabilities will be populated. |
|
Disconnect ( bool quit, |
Disconnect the service. If quit is |
|
Expand ( string alias, |
Expand a mailing address alias. Expands a mailing address alias. |
|
ExpandAsync ( string alias, |
Asynchronously expand a mailing address alias. Asynchronously expands a mailing address alias. |
|
NoOp ( |
Ping the SMTP server to keep the connection alive. Mail servers, if left idle for too long, will automatically drop the connection. |
|
Send ( MimeKit.FormatOptions options, |
Send the specified message. Sends the specified message. The sender address is determined by checking the following message headers (in order of precedence): Resent-Sender, Resent-From, Sender, and From. If either the Resent-Sender or Resent-From addresses are present, the recipients are collected from the Resent-To, Resent-Cc, and Resent-Bcc headers, otherwise the To, Cc, and Bcc headers are used. |
|
Send ( MimeKit.FormatOptions options, |
Send the specified message using the supplied sender and recipients. Sends the message by uploading it to an SMTP server using the supplied sender and recipients. |
|
SmtpClient ( ) : System |
Initializes a new instance of the MailKit.Net.Smtp.SmtpClient class. Before you can send messages with the SmtpClient, you must first call one of the Connect methods. Depending on whether the SMTP server requires authenticating or not, you may also need to authenticate using one of the Authenticate methods. |
|
SmtpClient ( IProtocolLogger protocolLogger ) : System |
Initializes a new instance of the MailKit.Net.Smtp.SmtpClient class. Before you can send messages with the SmtpClient, you must first call one of the Connect methods. Depending on whether the SMTP server requires authenticating or not, you may also need to authenticate using one of the Authenticate methods. |
|
Verify ( string address, |
Verify the existence of a mailbox address. Verifies the existence a mailbox address with the SMTP server, returning the expanded mailbox address if it exists. |
|
VerifyAsync ( string address, |
Asynchronously verify the existence of a mailbox address. Asynchronously verifies the existence a mailbox address with the SMTP server, returning the expanded mailbox address if it exists. |
Метод | Описание | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the SmtpClient and optionally releases the managed resources. Releases the unmanaged resources used by the SmtpClient and optionally releases the managed resources. |
|
GetDeliveryStatusNotifications ( |
Get the types of delivery status notification desired for the specified recipient mailbox. Gets the types of delivery status notification desired for the specified recipient mailbox. |
|
GetEnvelopeId ( |
Get the envelope identifier to be used with delivery status notifications. The envelope identifier, if non-empty, is useful in determining which message a delivery status notification was issued for. The envelope identifier should be unique and may be up to 100 characters in length, but must consist only of printable ASCII characters and no white space. For more information, see rfc3461, section 4.4. |
|
OnNoRecipientsAccepted ( |
Invoked only when no recipients were accepted by the SMTP server. If OnRecipientNotAccepted is overridden to not throw an exception, this method should be overridden to throw an appropriate exception instead. |
|
OnRecipientAccepted ( |
Invoked when a recipient is accepted by the SMTP server. The default implementation does nothing. |
|
OnRecipientNotAccepted ( |
Invoked when a recipient is not accepted by the SMTP server. The default implementation throws an appropriate SmtpCommandException. |
|
OnSenderAccepted ( |
Invoked when the sender is accepted by the SMTP server. The default implementation does nothing. |
|
OnSenderNotAccepted ( |
Invoked when a recipient is not accepted by the SMTP server. The default implementation throws an appropriate SmtpCommandException. |
Метод | Описание | |
---|---|---|
AddUnique ( IList |
||
Bdat ( MimeKit.FormatOptions options, |
||
CheckDisposed ( ) : void | ||
ComputeDefaultValues ( string host, int &port, SecureSocketOptions &options, |
||
Data ( MimeKit.FormatOptions options, |
||
Disconnect ( ) : void | ||
Ehlo ( |
||
FlushCommandQueue ( |
||
GetMessageRecipients ( |
||
GetMessageSender ( |
||
GetNotifyString ( DeliveryStatusNotification notify ) : string | ||
MailFrom ( |
||
ProcessMailFromResponse ( |
||
ProcessRcptToResponse ( |
||
QueueCommand ( SmtpCommand type, string command, |
||
RcptTo ( |
||
ReplayConnect ( string hostName, Stream replayStream, |
||
Reset ( |
||
Send ( MimeKit.FormatOptions options, |
||
SendCommand ( string command, |
||
SendEhlo ( bool ehlo, |
||
ValidateRemoteCertificate ( object sender, |
public Authenticate ( Portable.Text.Encoding encoding, ICredentials credentials, |
||
encoding | Portable.Text.Encoding | The text encoding to use for the user's credentials. |
credentials | ICredentials | The user's credentials. |
cancellationToken | The cancellation token. | |
Результат | void |
public Connect ( |
||
socket | The socket to use for the connection. | |
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. | |
Результат | void |
public 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. | |
Результат | void |
public Disconnect ( bool quit, |
||
quit | bool | If set to |
cancellationToken | The cancellation token. | |
Результат | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
Результат | void |
public Expand ( string alias, |
||
alias | string | The mailing address alias. |
cancellationToken | The cancellation token. | |
Результат | InternetAddressList |
public ExpandAsync ( string alias, |
||
alias | string | The mailing address alias. |
cancellationToken | The cancellation token. | |
Результат | Task |
protected GetDeliveryStatusNotifications ( |
||
message | The message being sent. | |
mailbox | MimeKit.MailboxAddress | The mailbox. |
Результат | DeliveryStatusNotification? |
protected GetEnvelopeId ( |
||
message | The message. | |
Результат | string |
public NoOp ( |
||
cancellationToken | The cancellation token. | |
Результат | void |
protected OnNoRecipientsAccepted ( |
||
message | The message being sent. | |
Результат | void |
protected OnRecipientAccepted ( |
||
message | The message being sent. | |
mailbox | MimeKit.MailboxAddress | The mailbox used in the |
response | MailKit.Net.Smtp.SmtpResponse | The response to the |
Результат | void |
protected OnRecipientNotAccepted ( |
||
message | The message being sent. | |
mailbox | MimeKit.MailboxAddress | The mailbox used in the |
response | MailKit.Net.Smtp.SmtpResponse | The response to the |
Результат | void |
protected OnSenderAccepted ( |
||
message | The message being sent. | |
mailbox | MimeKit.MailboxAddress | The mailbox used in the |
response | MailKit.Net.Smtp.SmtpResponse | The response to the |
Результат | void |
protected OnSenderNotAccepted ( |
||
message | The message being sent. | |
mailbox | MimeKit.MailboxAddress | The mailbox used in the |
response | MailKit.Net.Smtp.SmtpResponse | The response to the |
Результат | void |
public Send ( MimeKit.FormatOptions options, |
||
options | MimeKit.FormatOptions | The formatting options. |
message | The message. | |
cancellationToken | The cancellation token. | |
progress | ITransferProgress | The progress reporting mechanism. |
Результат | void |
public Send ( MimeKit.FormatOptions options, |
||
options | MimeKit.FormatOptions | The formatting options. |
message | The message. | |
sender | MimeKit.MailboxAddress | The mailbox address to use for sending the message. |
recipients | IEnumerable |
The mailbox addresses that should receive the message. |
cancellationToken | The cancellation token. | |
progress | ITransferProgress | The progress reporting mechanism. |
Результат | void |
public SmtpClient ( IProtocolLogger protocolLogger ) : System | ||
protocolLogger | IProtocolLogger | The protocol logger. |
Результат | System |
public Verify ( string address, |
||
address | string | The mailbox address. |
cancellationToken | The cancellation token. | |
Результат | MimeKit.MailboxAddress |
public VerifyAsync ( string address, |
||
address | string | The mailbox address. |
cancellationToken | The cancellation token. | |
Результат | Task |