public SparkpostEmailService(IOptions <SparkpostSettings> sparkpostSettings, IMjmlServices mjmlServices) { _mjmlServices = mjmlServices; _sparkpostSettings = sparkpostSettings.Value; _client = new SmtpClient(_sparkpostSettings.Host, _sparkpostSettings.Port) { Credentials = new NetworkCredential(_sparkpostSettings.UserName, _sparkpostSettings.Password), EnableSsl = true }; _refundAddress = new MailAddress(_sparkpostSettings.RefundAddress, "CAES UC Davis Refunds"); }
/// <summary> /// .ctor /// </summary> public EmailService(ILogger <EmailService> logger, IOurGardenRepository repository, IMjmlServices mjmlServices, IOptions <EmailServiceConfigurationOptions> emailOption, IOptions <RootOptions> rootOptions, IEmailSender emailSender) { _logger = logger; _repository = repository; _mjmlServices = mjmlServices; _emailServiceOptions = emailOption.Value; _rootOptions = rootOptions.Value; _emailSender = emailSender; }
public MemoriesService(IConfiguration configuration, IMjmlServices mjmlServices, IAccountService accountService, ISqLiteService sqLiteService, ISendGridClient sendGridClient, ILogger <MemoriesService> logger) { _configuration = configuration; _mjmlServices = mjmlServices; _accountService = accountService; _sqLiteService = sqLiteService; _sendGridClient = sendGridClient; _logger = logger; }
public void Setup() { var services = new ServiceCollection(); services.AddMjmlServices(o => { o.DefaultBeautify = false; o.DefaultKeepComments = true; o.DefaultMinify = false; }); var provider = services.BuildServiceProvider(); _mjmlServices = provider.GetRequiredService <IMjmlServices>(); }
public EmailService(IWebHostEnvironment environment, IOptions <SparkpostSettings> emailSettings, IMjmlServices mjmlServices, TacoDbContext dbContext, UserManager <User> userManager) { _isDevelopment = environment.IsDevelopment(); _emailSettings = emailSettings.Value; _mjmlServices = mjmlServices; _dbContext = dbContext; _userManager = userManager; _client = new SmtpClient(_emailSettings.Host, _emailSettings.Port) { Credentials = new NetworkCredential(_emailSettings.UserName, _emailSettings.Password), EnableSsl = true }; }
public EmailFormatter(IImageFormatter imageFormatter, IMjmlServices mjmlServices) { this.imageFormatter = imageFormatter; this.mjmlServices = mjmlServices; }