public ITemplateEngine Create(TemplateSyntaxEnum syntax)
 {
     switch (syntax)
     {
         case TemplateSyntaxEnum.Handlebars:
             return _handlebarsEngine.Value;
         case TemplateSyntaxEnum.Razor:
             return new RazorTemplateEngine();
     }
     throw new NotSupportedException($"Template syntax of type {syntax} not supported");
 }
        public async Task SendAsync(IEnumerable<string> to, IEnumerable<string> cc, string @from, string emailTemplateId, Dictionary<string, string> mergeValues, TemplateSyntaxEnum templateSyntax = TemplateSyntaxEnum.Razor)
        {
            _logger?.Verbose("EmailQueueDispatcher - SendAsync with template - {0}", emailTemplateId);

            EmailQueueItem item = new EmailQueueItem
            {
                Cc = new List<string>(cc),
                EmailTemplateId = emailTemplateId,
                From = from,
                MergeData = mergeValues,
                To = new List<string>(to),
                TemplateSyntax = templateSyntax
            };

            await _queue.EnqueueAsync(item);
        }
 public Task SendAsync(string to, string cc, string @from, string emailTemplateId, Dictionary<string, string> mergeValues, TemplateSyntaxEnum templateSyntax = TemplateSyntaxEnum.Razor)
 {
     return SendAsync(new[] {to}, new[] {cc}, @from, emailTemplateId, mergeValues);
 }