Exemplo n.º 1
0
        public EmailHelper ApplyTemplate(string mailType, TemplatePipeline pipeline)
        {
            var messageToPersonalize = new TemplateMailMessage(_mailConfiguration, mailType);

            if (messageToPersonalize.Loaded)
            {
                var engine = new TemplateEngine(messageToPersonalize, pipeline);
                CurrentEngine = engine;
            }
            return(this);
        }
Exemplo n.º 2
0
 public TemplateEngine(IFormatableTextProvider provider, TemplatePipeline pipeline)
 {
     TextProvider = provider;
     Pipeline = pipeline;
 }
Exemplo n.º 3
0
        public EmailHelper ApplyTemplate(string mailType, TemplatePipeline pipeline, Action emailSentAction = null, Action emailFailedAction = null)
        {
            var mailConfig = XmlSection<MailConfiguration>.GetSection("mailConfiguration");
            if (mailConfig.CommonConfiguration.OverrideToAddress)
            {
                ToAddressOverride = mailConfig.CommonConfiguration.ToAddress;
            }

            var messageToPersonalize = new TemplateMailMessage(mailType);
            if (messageToPersonalize.Loaded)
            {
                var engine = new TemplateEngine(messageToPersonalize, pipeline);
                CurrentEngine = engine;
                return this;
            }
            return null;
        }
Exemplo n.º 4
0
 public TemplateEngine(TemplateMailMessage provider, TemplatePipeline pipeline)
 {
     TextProvider = provider;
     Pipeline     = pipeline;
 }