protected EmailConfigurationModel( string username, string password, EmailAddressModel fromEmail, List <EmailAddressModel> toEmail, string host, int port, bool enableSsl, string subject, EmailBodyModel body) { Username = Utils.IsNullOrEmptyThrowException(username, nameof(username)); Password = Utils.IsNullOrEmptyThrowException(password, nameof(password)); EmailAddress = Utils.IsNullThrowException <EmailAddressModel>(fromEmail, nameof(fromEmail)); To = Utils.IsNullAndCountThrowException(toEmail, nameof(toEmail)); Host = Utils.IsNullOrEmptyThrowException(host, nameof(host)); Port = port; EnableSsl = enableSsl; Subject = Utils.IsNullOrEmptyThrowException(subject, nameof(subject)); Body = Utils.IsNullThrowException <EmailBodyModel>(body, nameof(body)); }