private SmtpClient parseSmtpClient(MailConfig config) { SmtpClient smtpClient = new SmtpClient(); if (!string.IsNullOrEmpty(config.Username)) { smtpClient.Credentials = new NetworkCredential(config.Username, config.Password); } smtpClient.Host = config.Host; smtpClient.Port = config.Port; smtpClient.Timeout = config.Timeout; return(smtpClient); }
public MailSender(MailConfig config) { this.config = config; }
public DefaultMailSender(MailConfig config) : base(config) { }