示例#1
0
 public EmailSender(IParticipant participant, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent = EPiServer.DataFactory.Instance.Get<EventPageBase>(participant.EventPage);
     CurrentParticipant = participant;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, CurrentParticipant);
 }
示例#2
0
 public EmailSender(EventPageBase EventPageBase, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent = EventPageBase;
     CurrentParticipant = null;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, null);
 }
示例#3
0
 public EmailSender(IParticipant participant, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent       = EPiServer.DataFactory.Instance.Get <EventPageBase>(participant.EventPage);
     CurrentParticipant = participant;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, CurrentParticipant);
 }
示例#4
0
 public static EmailTemplate Load(EmailTemplateBlock template, EventPageBase EventPageBase, IParticipant participant)
 {
     EmailTemplate email = new EmailTemplate();
     email.HtmlBody = PopulatePropertyValues(template.MainBody != null ? template.MainBody.ToString() : string.Empty, EventPageBase, participant);
     email.Body = PopulatePropertyValues(template.MainTextBody, EventPageBase, participant);
     email.To = PopulatePropertyValues(template.To, EventPageBase, participant);
     email.From = PopulatePropertyValues(template.From, EventPageBase, participant);
     email.Cc = PopulatePropertyValues(template.CC, EventPageBase, participant);
     email.Bcc = PopulatePropertyValues(template.BCC, EventPageBase, participant);
     email.Subject = PopulatePropertyValues(template.Subject, EventPageBase, participant);
     email.Participant = participant;
     email.SendAsSms = template.SendAsSms;
     return email;
 }
示例#5
0
 public EmailSender(EventPageBase EventPageBase, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent       = EventPageBase;
     CurrentParticipant = null;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, null);
 }