/// <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; } }
/// <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; } }