C# Class org.GraphDefined.Vanaheimr.Hermod.SMTP.SMTPClient

A SMTP client for sending e-mails.
Inheritance: org.GraphDefined.Vanaheimr.Hermod.Sockets.TCP.TCPClient
Afficher le fichier Open project: Vanaheimr/Hermod Class Usage Examples

Méthodes publiques

Свойство Type Description
Capabilities SmtpCapabilities

Méthodes publiques

Méthode Description
Dispose ( ) : void
SMTPClient ( String RemoteHost, IPPort RemotePort, String Login = null, String Password = null, String LocalDomain = null, System.Boolean UseIPv4 = true, System.Boolean UseIPv6 = false, System.Boolean PreferIPv6 = false, TLSUsage UseTLS = TLSUsage.STARTTLS, ValidateRemoteCertificateDelegate ValidateServerCertificate = null, System.TimeSpan ConnectionTimeout = null, DNSClient DNSClient = null, System.Boolean AutoConnect = false, CancellationToken CancellationToken = null ) : System

Create a new SMTP client for sending e-mails.

Send ( AbstractEMailBuilder MailBuilder, Byte NumberOfRetries = 3, System.Boolean AutoStart = true ) : Task
Send ( EMail EMail, Byte NumberOfRetries = 3, System.Boolean AutoStart = true ) : Task
Send ( EMailEnvelop EMailEnvelop, Byte NumberOfRetries = 3, System.Boolean AutoStart = true ) : Task

Méthodes protégées

Méthode Description
ReadSMTPResponses ( ) : IEnumerable
SendCommand ( String Command ) : void
SendCommandAndWait ( String Command ) : SMTPExtendedResponse
SendCommandAndWaits ( String Command ) : IEnumerable

Private Methods

Méthode Description
GenerateMessageId ( EMail Mail, String DomainPart = null ) : MessageId
ReadSMTPResponse ( ) : SMTPExtendedResponse

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ReadSMTPResponses() protected méthode

protected ReadSMTPResponses ( ) : IEnumerable
Résultat IEnumerable

SMTPClient() public méthode

Create a new SMTP client for sending e-mails.
public SMTPClient ( String RemoteHost, IPPort RemotePort, String Login = null, String Password = null, String LocalDomain = null, System.Boolean UseIPv4 = true, System.Boolean UseIPv6 = false, System.Boolean PreferIPv6 = false, TLSUsage UseTLS = TLSUsage.STARTTLS, ValidateRemoteCertificateDelegate ValidateServerCertificate = null, System.TimeSpan ConnectionTimeout = null, DNSClient DNSClient = null, System.Boolean AutoConnect = false, CancellationToken CancellationToken = null ) : System
RemoteHost String
RemotePort IPPort
Login String
Password String
LocalDomain String
UseIPv4 System.Boolean Whether to use IPv4 as networking protocol.
UseIPv6 System.Boolean Whether to use IPv6 as networking protocol.
PreferIPv6 System.Boolean Prefer IPv6 (instead of IPv4) as networking protocol.
UseTLS TLSUsage Whether Transport Layer Security should be used or not.
ValidateServerCertificate ValidateRemoteCertificateDelegate A callback for validating the remote server certificate.
ConnectionTimeout System.TimeSpan The timeout connecting to the remote service.
DNSClient DNSClient An optional DNS client used to resolve DNS names.
AutoConnect System.Boolean Connect to the TCP service automatically on startup. Default is false.
CancellationToken System.Threading.CancellationToken
Résultat System

Send() public méthode

public Send ( AbstractEMailBuilder MailBuilder, Byte NumberOfRetries = 3, System.Boolean AutoStart = true ) : Task
MailBuilder AbstractEMailBuilder
NumberOfRetries Byte
AutoStart System.Boolean
Résultat Task

Send() public méthode

public Send ( EMail EMail, Byte NumberOfRetries = 3, System.Boolean AutoStart = true ) : Task
EMail org.GraphDefined.Vanaheimr.Hermod.Mail.EMail
NumberOfRetries Byte
AutoStart System.Boolean
Résultat Task

Send() public méthode

public Send ( EMailEnvelop EMailEnvelop, Byte NumberOfRetries = 3, System.Boolean AutoStart = true ) : Task
EMailEnvelop org.GraphDefined.Vanaheimr.Hermod.Mail.EMailEnvelop
NumberOfRetries Byte
AutoStart System.Boolean
Résultat Task

SendCommand() protected méthode

protected SendCommand ( String Command ) : void
Command String
Résultat void

SendCommandAndWait() protected méthode

protected SendCommandAndWait ( String Command ) : SMTPExtendedResponse
Command String
Résultat SMTPExtendedResponse

SendCommandAndWaits() protected méthode

protected SendCommandAndWaits ( String Command ) : IEnumerable
Command String
Résultat IEnumerable

Property Details

Capabilities public_oe property

public SmtpCapabilities Capabilities
Résultat SmtpCapabilities