private async Task SendEmail(Appointment appointment, User notifiedUser) { var template = await _emailTemplateRepository.GetByNameAsync(TemplateNames.ConfirmAppointment); var values = await _appointmentService.GetTemplateValues(appointment); var to = new EmailAddress(notifiedUser.Email, notifiedUser.FullName); var message = new EmailMessage("Extivita HBOT Appointment", template, values, to) { CalendarEntry = _appointmentService.CreateCalendarEntry(appointment, CalendarEntryStatus.Confirmed) }; _jobManager.Enqueue(message); }
private async Task SendEmail( Appointment appointment, User notifiedUser, Dictionary <string, string> values) { var template = await _emailTemplateRepository.GetByNameAsync(TemplateNames.AppointmentRescheduled); var to = new EmailAddress(notifiedUser.Email, notifiedUser.FullName); var message = new EmailMessage("Extivita HBOT Appointment", template, values, to) { CalendarEntry = _appointmentService.CreateCalendarEntry(appointment, CalendarEntryStatus.Updated) }; _jobManager.Enqueue(message); }