Exemple #1
0
        public Stream ExportMailTemplate(int id)
        {
            var template = _mailTemplates.Get(id).ConvertTo <MailTemplate>();
            var exporter = new MailTemplateExporter();
            var stream   = new MemoryStream();

            exporter.ExportAsXml(stream, template);

            stream.Position = 0;

            return(stream);
        }
        public async Task SendAsync(Enum key, string to, Action <IMail, bool> action = null, params object[] parameters)
        {
            var mail = _mailTemplateProvider.Get(key, to, parameters);

            await SendAsync(mail, action);
        }