コード例 #1
0
        public static Email WithTemplateBody(this Email email, string templateName, IDictionary <string, string> placeHolderValues = null, bool isHtml = true)
        {
            var body = new TemplateBody()
            {
                TemplateName = templateName, IsHtml = isHtml
            };

            if (placeHolderValues != null)
            {
                foreach (var key in placeHolderValues.Keys)
                {
                    body[key] = placeHolderValues[key];
                }
            }
            email.Body = body;
            return(email);
        }
コード例 #2
0
ファイル: Email.cs プロジェクト: ytokas/appacitive-dotnet-sdk
 public static Email WithTemplateBody(this Email email, string templateName, IDictionary<string, string> placeHolderValues = null, bool isHtml = true)
 {
     var body = new TemplateBody() { TemplateName = templateName, IsHtml = isHtml };
     if (placeHolderValues != null)
     {
         foreach (var key in placeHolderValues.Keys)
             body[key] = placeHolderValues[key];
     }
     email.Body = body;
     return email;
 }