コード例 #1
0
 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;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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;
 }
コード例 #4
0
        public string GetSender(IEmailTemplateInteractor emailTemplateInteractor)
        {
            var template = emailTemplateInteractor.GetEmailTemplate(TemplateName, ChannelKey, Variant);

            return(template?.Sender);
        }