<PackageReference Include="castle.core" Version="2.5.2" />

DefaultSmtpSender

Default IEmailSender implementation.
public bool AsyncSend { get; set; }

Gets or sets a value which is used to configure if emails are going to be sent asyncrhonously or not.

public string Domain { get; set; }

Gets or sets the domain.

public string Hostname { get; }

Gets the hostname.

public string Password { get; set; }

Gets or sets the password.

public int Port { get; set; }

Gets or sets the port used to access the SMTP server

public int Timeout { get; set; }

Gets or sets a value that specifies the amount of time after which a synchronous Send call times out.

public string UserName { get; set; }

Gets or sets the name of the user.

public bool UseSsl { get; set; }

Gets or sets a value indicating whether the email should be sent using a secure communication channel.

Initializes a new instance of the DefaultSmtpSender class based on the SmtpClient configuration provided in the application configuration file.

public DefaultSmtpSender(string hostname)

This service implementation requires a host name in order to work

protected virtual void Configure(SmtpClient smtpClient)

Configures the sender with port information and eventual credential informed

public void Send(string from, string to, string subject, string messageText)

Sends a message.

public void Send(MailMessage message)

Sends a message.

public void Send(IEnumerable<MailMessage> messages)