public static MailTemplate GetMailTemplateByID(string templateID) { MailTemplate tem = MailConfig.GetMailTemplate(templateID); if (tem == null) { throw new ApplicationException("目标模板[" + templateID + "]未找到!"); } return(tem); }
public static string GetMailTemplateBody(string templateID, out string subject) { MailTemplate tem = MailConfig.GetMailTemplate(templateID); if (tem != null && !string.IsNullOrEmpty(tem.Body)) { subject = tem.Subject; return(tem.Body); } subject = string.Empty; return(string.Empty); }
public static MailTemplate BuildMailTemplate(MailTemplate template, KeyValueVariables keyValues, KeyTableVariables keyTables) { MailTemplate tem = MailConfig.BuildMailTemplate(template, keyValues, keyTables); return(tem); }