public void OverrideWith(SmtpConfiguration other) { this.Host = other.Host; this.Port = other.Port; this.Username = other.Username; this.Password = other.Password; this.SecureSocketOptions = other.SecureSocketOptions; }
public MailSender(SmtpConfiguration configuration) { // TODO check params this.Credentials = new NetworkCredential(configuration.Username, configuration.Password); this.Host = configuration.Host; this.Port = configuration.Port; this.SecurityOptions = configuration.SecureSocketOptions; }