示例#1
0
        private EmailMessage CreateMedicalReportReminderMessage(MedicalReport medicalReport)
        {
            var applicationUser = medicalReport.Employee.UserCompany.ApplicationUser;

            EmailMessage message = new EmailMessage()
            {
                EmailType         = Enumerations.EmailType.OSHTrainingExpiredReminder,
                EmployeeId        = medicalReport.EmployeeId,
                ApplicationUserID = applicationUser.Id,
                Recipient         = EncryptionService.DecryptEmail(applicationUser.Email),
                Body    = WebResources.MedicalResultToExpireReminderEmailBody,
                Subject = WebResources.MedicalResultToExpireReminderEmailTitle
            };

            _emailMessageService.Create(message);

            return(message);
        }