public EmailNotificationChannel([NotNull] IConfiguration configuration, [NotNull] ILogger logger, [NotNull] ISmtpClientProvider smtpClientProvider)
 {
     _Logger             = logger ?? throw new ArgumentNullException(nameof(logger));
     _SmtpClientProvider = smtpClientProvider ?? throw new ArgumentNullException(nameof(smtpClientProvider));
     _Configuration      = configuration["Notifications/Email"]
                           .Element <EmailNotificationChannelConfiguration>()
                           .WithDefault(() => new EmailNotificationChannelConfiguration());
 }
Ejemplo n.º 2
0
 public EmailService(ISmtpClientProvider smtpClient,
                     ITemplateProvider templateProvider,
                     IContentBuilder contentBuilder,
                     ICredentialsProvider credentialsProvider)
 {
     this.smtpClient          = smtpClient;
     this.templateProvider    = templateProvider;
     this.contentBuilder      = contentBuilder;
     this.credentialsProvider = credentialsProvider;
 }