/// <summary>
 ///     Default constructor with DI
 /// </summary>
 /// <param name="serviceOptions">Configuration options</param>
 /// <param name="logger">An instance of ILogger for recording</param>
 /// <param name="hostingEnvironment">Current environment information</param>
 /// <param name="emailTemplateFactory">The ICG Email Template Factory for formatting messages</param>
 public MimeMessageFactory(IOptions <SmtpServiceOptions> serviceOptions, ILogger <MimeMessageFactory> logger, IHostingEnvironment hostingEnvironment, IEmailTemplateFactory emailTemplateFactory)
 {
     _serviceOptions       = serviceOptions.Value;
     _logger               = logger;
     _hostingEnvironment   = hostingEnvironment;
     _emailTemplateFactory = emailTemplateFactory;
 }
Esempio n. 2
0
 /// <summary>
 ///     DI Capable Constructor for SMTP message delivery using MimeKit/MailKit
 /// </summary>
 /// <param name="serviceOptions"></param>
 /// <param name="mimeMessageFactory"></param>
 /// <param name="mimeKitService"></param>
 public SmtpService(IOptions <SmtpServiceOptions> serviceOptions, IMimeMessageFactory mimeMessageFactory,
                    IMimeKitService mimeKitService)
 {
     _serviceOptions     = serviceOptions.Value;
     _mimeMessageFactory = mimeMessageFactory;
     _mimeKitService     = mimeKitService;
 }