public async Task SendForgotMail(PersonnelCreatedEmail forgotEmail) { var templateJson = forgotEmail.ToJson(); var body = _templateBusinessService.CreateText(templateJson, forgotEmail.TemplateName); if (body == null) { return; } await _emailBusinessService.SendEmail(new EmailData { Subject = forgotEmail.Subject, //ToDo ToAddressList = forgotEmail.ToAddress, IsHtml = true, Body = body }); }
public async Task SendConfirmationMail(PersonnelCreatedEmail personnelCreatedEmail) { var templateJson = personnelCreatedEmail.ToJson(); var body = _templateBusinessService.CreateText(templateJson, personnelCreatedEmail.TemplateName); if (body == null) { return; } try { await _emailBusinessService.SendEmail(new EmailData { Subject = personnelCreatedEmail.Subject, //ToDo ToAddressList = personnelCreatedEmail.ToAddress, IsHtml = true, Body = body }); } catch (Exception) { throw new Exception(); } }