public EmailManager(IEmailProvider emailProvider, IEmailTemplateInteractor emailTemplateInteractor, IEmailHistoryInteractor emailHistoryInteractor, IEmailQuotaInteractor emailQuotaInteractor, EmailProviderConnectionString emailProviderConnectionString, ILogger <EmailManager> logger) { _emailProvider = emailProvider; _emailTemplateInteractor = emailTemplateInteractor; _emailHistoryInteractor = emailHistoryInteractor; _emailQuotaInteractor = emailQuotaInteractor; _emailProviderConnectionString = emailProviderConnectionString; _logger = logger; }
public string GetMessage(IEmailTemplateInteractor emailTemplateInteractor) { var template = emailTemplateInteractor.GetEmailTemplate(TemplateName, ChannelKey, Variant); var msg = template?.MessageTemplate; foreach (var item in MessageParts) { msg = msg.ToLower().Replace($"{{{item.Key.ToLower()}}}", item.Value); } return(msg); }
public EmailInteractor(IEmailEventInteractor emailEventInteractor, IEmailPoolInteractor emailPoolInteractor, IEmailProviderInteractor emailProviderInteractor, IEmailChannelInteractor emailChannelInteractor, IEmailTemplateInteractor emailTemplateInteractor, IEmailHistoryInteractor emailHistoryInteractor, ILogger <EmailInteractor> logger) { _emailEventInteractor = emailEventInteractor; _emailPoolInteractor = emailPoolInteractor; _emailProviderInteractor = emailProviderInteractor; _emailChannelInteractor = emailChannelInteractor; _emailTemplateInteractor = emailTemplateInteractor; _emailHistoryInteractor = emailHistoryInteractor; _logger = logger; }
public string GetSender(IEmailTemplateInteractor emailTemplateInteractor) { var template = emailTemplateInteractor.GetEmailTemplate(TemplateName, ChannelKey, Variant); return(template?.Sender); }