diff --git a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs index 467243a23..41993244b 100644 --- a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs +++ b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs @@ -51,14 +51,14 @@ public class EmailLogService(IRepository _emailLogRepository, [HttpPost] public async Task> GetEmailLogList(EmailLogQuery inDto) { - var emailFromEmail = await _trialRepository.Where(x=>x.Id==inDto.TrialId).Select(x=>x.EmailFromEmail).FirstOrDefaultAsync(); + var emailFromName = await _trialRepository.Where(x=>x.Id==inDto.TrialId).Select(x=>x.EmailFromName).FirstOrDefaultAsync(); - if (emailFromEmail.IsNullOrEmpty()) + if (emailFromName.IsNullOrEmpty()) { - emailFromEmail = _systemEmailConfig.FromEmail; + emailFromName = _systemEmailConfig.FromName; } var emailLogQueryable = _emailLogRepository - .Where(x=>x.SenderAddress== emailFromEmail) + .Where(x=>x.SenderName== emailFromName) .WhereIf(inDto.EmailStartDate.HasValue, x => x.EmailDate >= inDto.EmailStartDate.Value) .WhereIf(inDto.EmailEndDate.HasValue, x => x.EmailDate <= inDto.EmailEndDate.Value) .WhereIf(inDto.EmailStateEnum.HasValue, x => x.EmailStateEnum == inDto.EmailStateEnum.Value)