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()); }
public EmailService(ISmtpClientProvider smtpClient, ITemplateProvider templateProvider, IContentBuilder contentBuilder, ICredentialsProvider credentialsProvider) { this.smtpClient = smtpClient; this.templateProvider = templateProvider; this.contentBuilder = contentBuilder; this.credentialsProvider = credentialsProvider; }