public static void SendAsync(EmailCredential credential, EmailHelperModel model) { using (EmailHelper emailHelper = new EmailHelper(credential)) { emailHelper.SendAsync(model); } }
public EmailHelper(EmailCredential credential) : this(credential.SmtpPort, credential.SmtpServer, credential.LoginName, credential.Password) { }