예제 #1
0
        public static MailTemplate GetMailTemplateByID(string templateID)
        {
            MailTemplate tem = MailConfig.GetMailTemplate(templateID);

            if (tem == null)
            {
                throw new ApplicationException("目标模板[" + templateID + "]未找到!");
            }
            return(tem);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public static MailTemplate BuildMailTemplate(MailTemplate template, KeyValueVariables keyValues, KeyTableVariables keyTables)
        {
            MailTemplate tem = MailConfig.BuildMailTemplate(template, keyValues, keyTables);

            return(tem);
        }