Exemplo n.º 1
0
 public EmailSender(IParticipant participant, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent = EPiServer.DataFactory.Instance.Get<EventPageBase>(participant.EventPage);
     CurrentParticipant = participant;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, CurrentParticipant);
 }
Exemplo n.º 2
0
 public EmailSender(EventPageBase EventPageBase, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent = EventPageBase;
     CurrentParticipant = null;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, null);
 }
Exemplo n.º 3
0
 public EmailSender(IParticipant participant, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent       = EPiServer.DataFactory.Instance.Get <EventPageBase>(participant.EventPage);
     CurrentParticipant = participant;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, CurrentParticipant);
 }
Exemplo n.º 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;
 }
Exemplo n.º 5
0
 public EmailSender(EventPageBase EventPageBase, EmailTemplateBlock emailTemplate)
 {
     CurrentEvent       = EventPageBase;
     CurrentParticipant = null;
     Email = EmailTemplate.Load(emailTemplate, CurrentEvent, null);
 }