public ActivationIntegrationEventHandler(IActivationRepository repository, IActivationFactory factory, IUnitOfWork <ILedgerActivationDbAbstraction> unitOfWork, IEmailDispatcher emailDispatcher) { _unitOfWork = unitOfWork; _repository = repository; _factory = factory; _emailDispatcher = emailDispatcher; }
public CustomerCheckedOutHandle(IEmailGenerator emailGenerator, IEmailDispatcher emailSender, ICustomerRepository customerRepository) { this.emailDispatcher = emailSender; this.emailGenerator = emailGenerator; this.customerRepository = customerRepository; }
public EmailService(INotificationSettingsRepository notificationSettingsRepository, IEmailDispatcher emailDispatcher, ICurrentMarket currentMarket, IContentLoader contentLoader) { _notificationSettingsRepository = notificationSettingsRepository; _emailDispatcher = emailDispatcher; _currentMarket = currentMarket; _contentLoader = contentLoader; }
public EmailOutbox(IEmailDispatcher dispatcher, IMailMessageCreator messageCreator, IEmailRepository repository, ILogger <EmailOutbox> log) { Dispatcher = dispatcher; MessageCreator = messageCreator; Repository = repository; Log = log; }
public void SetUp() { IEnumerable <KeyValuePair <MessageTypes, EmailMessageFormatter> > emailMessageFormatters = new[] { new KeyValuePair <MessageTypes, EmailMessageFormatter>(MessageTypes.EmployerEnquiry, new EmailSimpleMessageFormatter()), new KeyValuePair <MessageTypes, EmailMessageFormatter>(MessageTypes.EmployerEnquiryConfirmation, new EmailSimpleMessageFormatter()), new KeyValuePair <MessageTypes, EmailMessageFormatter>(MessageTypes.GlaEmployerEnquiry, new EmailSimpleMessageFormatter()), new KeyValuePair <MessageTypes, EmailMessageFormatter>(MessageTypes.GlaEmployerEnquiryConfirmation, new EmailSimpleMessageFormatter()), new KeyValuePair <MessageTypes, EmailMessageFormatter>(MessageTypes.WebAccessRequest, new EmailSimpleMessageFormatter()), new KeyValuePair <MessageTypes, EmailMessageFormatter>(MessageTypes.WebAccessRequestConfirmation, new EmailSimpleMessageFormatter()) }; var container = new Container(x => { x.For <IConfigurationManager>().Singleton().Use <ConfigurationManager>(); x.For <IEmailDispatcher>().Use <SendGridEmailDispatcher>().Named("SendGridEmailDispatcher").Ctor <IEnumerable <KeyValuePair <MessageTypes, EmailMessageFormatter> > >() .Is(emailMessageFormatters); x.For <IEmailDispatcher>().Use <VoidEmailDispatcher>().Name = "VoidEmailDispatcher"; x.For <SendGridConfiguration>().Singleton().Use(SendGridConfiguration.Instance); x.For <IEmailDispatcher>().Use <VoidEmailDispatcher>().Name = "VoidEmailDispatcher"; }); container.Configure(c => c.For <ILogService>().Use(_logServiceMock.Object)); container.Configure(c => c.For <IXmlGenerator>().Use(_xmlGeneratorMock.Object)); _dispatcher = container.GetInstance <IEmailDispatcher>("SendGridEmailDispatcher"); _voidEmailDispatcher = container.GetInstance <IEmailDispatcher>("VoidEmailDispatcher"); }
public EmailService(INotificationSettingsRepository notificationSettingsRepository, IEmailDispatcher emailDispatcher, ICurrentMarket currentMarket, IContentLoader contentLoader, IMarketService marketService) { _notificationSettingsRepository = notificationSettingsRepository; _emailDispatcher = emailDispatcher; _currentMarket = currentMarket; _contentLoader = contentLoader; _marketService = marketService; }
public AccountsController(RCMUserManager rcmUserManager, RCMSignInManager rcmSignInManager, IDomainNotificationHandler domainNotificationHandler, IHttpContextAccessor httpContextAccessor, IEmailGenerator emailGenerator, IEmailDispatcher emailDispatcher) : base(domainNotificationHandler) { _rcmUserManager = rcmUserManager; _rcmSignInManager = rcmSignInManager; _httpContextAccessor = httpContextAccessor; _emailGenerator = emailGenerator; _emailDispatcher = emailDispatcher; }
public TenantCreatedHandler(MessageGenerator <EmailTemplate, EmailMessage> emailMsgGenerator, IEmailDispatcher emailDispatcher, IConfigurationProvider configProvider) { this.emailMsgGenerator = emailMsgGenerator; this.emailDispatcher = emailDispatcher; this.configProvider = configProvider; }
public EmailOutbox(IEmailDispatcher dispatcher, IMailMessageCreator messageCreator, IDatabase database, IConfiguration config, ILogger <EmailOutbox> log) { Dispatcher = dispatcher; MessageCreator = messageCreator; Database = database; Config = config.GetSection("Email").Get <EmailConfiguration>(); Log = log; }
public SendVerificationEmailHandler( ILogger <GetUserProvidersHandler> logger, UserManager <AppUser> userManager, IEmailTemplateGenerator emailTemplateGenerator, IEmailDispatcher emailDispatcher ) { _logger = logger; _userManager = userManager; _emailTemplateGenerator = emailTemplateGenerator; _emailDispatcher = emailDispatcher; }
public ForgotPasswordHandler( ILogger <GetUserProvidersHandler> logger, UserManager <Models.AppUser> userManager, IEmailDispatcher emailDispatcher, IEmailTemplateGenerator emailTemplateGenerator ) { _logger = logger; _userManager = userManager; _emailDispatcher = emailDispatcher; _emailTemplateGenerator = emailTemplateGenerator; }
public EmailOutbox(IEmailDispatcher dispatcher, IMailMessageCreator messageCreator, IDatabase database, IConfiguration config, ILogger <EmailOutbox> log) { Dispatcher = dispatcher; MessageCreator = messageCreator; Database = database; Config = config.GetSection("Email").Get <EmailConfiguration>(); Log = log; Sending = new AsyncEvent <EmailSendingEventArgs>(); Sent = new AsyncEvent <EmailSendingEventArgs>(); SendError = new AsyncEvent <EmailSendingEventArgs>(); }
public void SetUp() { var container = new Container(x => { x.AddRegistry <CommonRegistry>(); x.AddRegistry <CommunicationRegistry>(); }); container.Configure(c => c.For <ILogService>().Use(_logServiceMock.Object)); _dispatcher = container.GetInstance <IEmailDispatcher>("SendGridEmailDispatcher"); _logServiceMock.ResetCalls(); }
/// <summary> /// Initializes a new instance of the <see cref="DefaultMailer"/> class. /// </summary> /// <param name="dispatcher"> /// The dispatcher. /// </param> public DefaultMailer(IEmailDispatcher dispatcher) { var container = DependencyResolver.Current.GetService <IContainer>(); config = container.GetInstance <IConfigService>(); jobManager = container.GetInstance <IJobManager>(); mailerEngine = new RazorMailerEngine( @"Views\EmailTemplates", config.DefaultEmailAddress, config.DefaultEmailName, dispatcher); }
public RegisterUserHandler( UserManager <Models.AppUser> userManager, SignInManager <Models.AppUser> signInManager, ILogger <RegisterUserHandler> logger, IEmailTemplateGenerator emailTemplateGenerator, IEmailDispatcher emailDispatcher) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailTemplateGenerator = emailTemplateGenerator; _emailDispatcher = emailDispatcher; }
public ExecuteRequestJob(ILogger <ExecuteRequestJob> logger, IMediator mediator, [KeyFilter(CubesConstants.Serializer_YAML)] ISerializer serializer, ITypeResolver typeResolver, IEmailDispatcher emailDispatcher, IOptionsSnapshot <SmtpSettingsProfiles> options) { this.logger = logger; this.mediator = mediator; this.serializer = serializer; this.typeResolver = typeResolver; this.emailDispatcher = emailDispatcher; this.smtpProfiles = options.Value; }
public UserInvitedHandler(MessageGenerator <EmailTemplate, EmailMessage> emailMsgGenerator, IEmailDispatcher emailDispatcher, IConfigurationProvider configurationProvider, IRepository <User> userRepository, IRepository <Tenant> tenantRepository, TenantContext tenantContext) { this.emailMsgGenerator = emailMsgGenerator; this.emailDispatcher = emailDispatcher; this.configProvider = configurationProvider; this.userRepository = userRepository; this.tenantRepository = tenantRepository; this.tenantContext = tenantContext; }
/// <summary> /// Constructs a RazorMailerEngine instance responsible for converting Razor templates into either a MailMessage or string. /// <para /> N.B. As this class loads up templates from the file system, it should only be created once per instance of your application. /// </summary> /// <param name="templatePath">The path to load the Razor templates from. e.g. @"email\templates". The template's Build Action should be set to Content and the Copy to Output Directory flag set to Copy Always</param> /// <param name="fromEmail">The address the email is from. e.g. [email protected]</param> /// <param name="fromName">The name the email is from. e.g. Your Site</param> /// <param name="dispatcher">The method by which to send the email. Custom dispatchers can be implemented using the IEmailDispatcher interface</param> public RazorMailerEngine(string templatePath, string fromEmail, string fromName, IEmailDispatcher dispatcher) { _fromName = fromName; _fromEmail = fromEmail; _dispatcher = dispatcher; // Find templates in a web application var webPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin", templatePath); // Find templates from a unit test or console application var libraryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, templatePath); var config = new TemplateServiceConfiguration { TemplateManager = new ResolvePathTemplateManager(new[] { webPath, libraryPath }) }; _service = RazorEngineService.Create(config); }
public EmailDispatcher(IEmailDispatcher dispatcher) { Debug.Assert(dispatcher != null, "The dispatcher should not be null, check configuration or DI."); Console.WriteLine("EmailDispatcher constructor initialization"); this._dispatcher = dispatcher; }
/// <summary> /// This overload allows us to pass in a mock dispatcher for testing purposes /// </summary> public AlarmesEquipamentosMailer(IEmailDispatcher dispatcher) { // Default to the built in Smtp engine _mailerEngine = new RazorMailerEngine(@"email\templates", "*****@*****.**", "Alarmes e Equipamentos", dispatcher); }
public AccountService(NutrientUserManager userManager, NutrientSignInManager signInManager, IEmailDispatcher emailDispatcher, IDomainNotificationHandler domainNotificationHandler, IIntegrationServiceBus integrationBus, ILogger <AccountService> logger) : base(userManager, domainNotificationHandler, integrationBus, logger) { _signInManager = signInManager; _emailDispatcher = emailDispatcher; }
public CustomerCheckedOutHandle(IEmailGenerator emailGenerator, IEmailDispatcher emailSender) { this.emailDispatcher = emailSender; this.emailGenerator = emailGenerator; }
public SendAccessRequestStrategy(IEmailDispatcher emailDispatcher, ILogService logger, IXmlGenerator xmlGenerator) { _emailDispatcher = emailDispatcher; _logger = logger; _xmlGenerator = xmlGenerator; }
public CustomerCreatedHandle(INewsletterSubscriber newsletterSubscriber, IEmailDispatcher emailDispatcher) { this.newsletterSubscriber = newsletterSubscriber; this.emailDispatcher = emailDispatcher; }
public EmailRequestSubscriber(IEmailDispatcher dispatcher, ILogService logService) { _dispatcher = dispatcher; _logService = logService; }
public CommunciationService(IEmailDispatcher emailDispatcher) { _emailDispatcher = emailDispatcher; }
/// <summary> /// This overload allows us to pass in a mock dispatcher for testing purposes /// </summary> public Mailer(IEmailDispatcher dispatcher) { // Default to the built in Smtp engine _mailerEngine = new RazorMailerEngine(@"email\templates", "*****@*****.**", "Sample Website", dispatcher); }
public CompanyIntegrationEventHandler(ICompanyRepository repository, IUnitOfWork <ILedgerCompanyDbAbstraction> unitOfWork, IEmailDispatcher emailDispatcher) { _repository = repository; _unitOfWork = unitOfWork; _emailDispatcher = emailDispatcher; }
public UserDomainEventHandler(IEmailDispatcher emailDispatcher, LedgerUserManager userManager) { _emailDispatcher = emailDispatcher; _userManager = userManager; }
public SendEmployerEnquiryStrategy(IEmailDispatcher emailDispatcher, ILogService logger, IXmlGenerator xmlGenerator) { _emailDispatcher = emailDispatcher; _logger = logger; _xmlGenerator = xmlGenerator; }
public EmailRequestConsumerAsync(IEmailDispatcher dispatcher) { _dispatcher = dispatcher; }