Example #1
0
 public TypedMailTemplate()
 {
     template = new MailTemplate();
     this.AddPlaceHolder(new PlaceHolder("RecieverIds", "RecieverIds", PlaceholderType.NoTag));
 }
Example #2
0
 protected virtual void Initialize(MailTemplate templ)
 {
     template = templ;
 }
Example #3
0
 internal static MailTemplate FromBasic (BasicMailTemplate basic)
 {
     MailTemplate templ = new MailTemplate(basic);
     return templ;
 }
Example #4
0
        internal static MailTemplate FromBasic(BasicMailTemplate basic)
        {
            MailTemplate templ = new MailTemplate(basic);

            return(templ);
        }
Example #5
0
 protected virtual void Initialize (string countryCode, int orgId, string variant)
 {
     try
     {
         template = MailTemplate.FromNameCountryAndOrg(this.BaseName + variant, countryCode, orgId);
     }
     catch
     {
         string name = this.BaseName + variant;
         if (name.EndsWith("Plain"))
         {
             try
             {
                 name = name.Substring(0, name.Length - 5);
                 template = MailTemplate.FromNameCountryAndOrg(name, countryCode, orgId);
             }
             catch (Exception e)
             {
                 throw new Exception("Failed to create MailTemplate.FromNameCountryAndOrg(" + name + "," + countryCode + "," + orgId + ")", e);
             }
         }
         else
         {
             try
             {
                 template = MailTemplate.FromNameCountryAndOrg(name + "Plain", countryCode, orgId);
             }
             catch (Exception e)
             {
                 throw new Exception("Failed to create (plain) MailTemplate.FromNameCountryAndOrg(" + name + "," + countryCode + "," + orgId + ")", e);
             }
         }
     }
 }
Example #6
0
 protected virtual void Initialize (MailTemplate templ)
 {
     template = templ;
 }
Example #7
0
        public TypedMailTemplate ()
        {
            template = new MailTemplate();
            this.AddPlaceHolder(new PlaceHolder("RecieverIds", "RecieverIds", PlaceholderType.NoTag));

        }