public static int GetRegMailTriggerId(EmailCategory category)
 {
     Type type = category.GetType();
     FieldInfo fi = type.GetField(category.ToString());
     RegMailTriggerIdAttribute[] attrs = fi.GetCustomAttributes(typeof(RegMailTriggerIdAttribute), false) as RegMailTriggerIdAttribute[];
     return attrs[0].TriggerId;
 }
 public static string GetHtmlContent(EmailCategory category)
 {
     Type type = category.GetType();
     FieldInfo fi = type.GetField(category.ToString());
     DefaultConfirmationEmailHtmlContentAttribute[] attrs = fi.GetCustomAttributes(typeof(DefaultConfirmationEmailHtmlContentAttribute), false) as DefaultConfirmationEmailHtmlContentAttribute[];
     return attrs[0].HtmlContent;
 }