Communication IEmailsCommand.GeneratePreview(TemplateEmail email, TemplateContentItem templateContentItem) { var copyItemEngine = _templateEngine.GetCopyItemEngine(templateContentItem); var context = new TemplateContext { Id = email.Id }; var copyItem = _templateEngine.GetCopyItem(copyItemEngine, context, email.Properties, null); return(email.CreateCommunication(copyItem)); }
Communication IEmailsCommand.GeneratePreview(TemplateEmail email) { var copyItem = GetCopyItem(email, email.Definition, email.Category, null); return(email.CreateCommunication(copyItem)); }