1
我的Kentico服務器無法發送電子郵件,所以我必須使用MacroResolver轉換我的電子郵件,但使用其他方式發送它。如何轉換Kentico電子郵件模板而不發送?
var clients = new List<Client>();
var macroResolver = MacroResolver.GetInstance();
macroResolver.AddDynamicParameter("clients", clients);
var emailMessage = new EmailMessage {
From = "[email protected]",
Recipients = "[email protected]",
Subject = "Whatever"
};
var template = EmailTemplateProvider.GetEmailTemplate(templateName, siteName);
EmailSender.SendEmailWithTemplateText(siteName, emailMessage, template, macroResolver, true);
換句話說,我想使用Kentico只是一個模板引擎。無論如何要實現這一目標?