Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Email"/> class.
 /// </summary>
 /// <param name="templateGuid">The template GUID.</param>
 public Email( Guid templateGuid )
 {
     Rock.CRM.EmailTemplateService service = new CRM.EmailTemplateService();
     Rock.CRM.EmailTemplate template = service.GetByGuid( templateGuid );
     if ( template != null )
     {
         To = template.To;
         From = template.From;
         Cc = template.Cc;
         Bcc = template.Bcc;
         Subject = template.Subject;
         Body = template.Body;
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Email"/> class.
 /// </summary>
 /// <param name="templateGuid">The template GUID.</param>
 public Email(Guid templateGuid)
 {
     Rock.CRM.EmailTemplateService service  = new CRM.EmailTemplateService();
     Rock.CRM.EmailTemplate        template = service.GetByGuid(templateGuid);
     if (template != null)
     {
         To      = template.To;
         From    = template.From;
         Cc      = template.Cc;
         Bcc     = template.Bcc;
         Subject = template.Subject;
         Body    = template.Body;
     }
 }