Add Reply-To diagnostic logging to GetEmailFromAsync
Logs a Warning when no Reply-To email is configured for a company (so the logs show why replies land at the platform sender address) and a Debug entry when one is set, making future send issues diagnosable without needing the SendGrid Activity API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1535,7 +1535,15 @@ public class NotificationService : INotificationService
|
|||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.FirstOrDefaultAsync(p => p.CompanyId == companyId && !p.IsDeleted);
|
.FirstOrDefaultAsync(p => p.CompanyId == companyId && !p.IsDeleted);
|
||||||
|
|
||||||
return (prefs?.EmailFromAddress, prefs?.EmailFromName);
|
var email = prefs?.EmailFromAddress;
|
||||||
|
var name = prefs?.EmailFromName;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(email))
|
||||||
|
_logger.LogWarning("No Reply-To email configured for company {CompanyId} — outgoing emails will show platform sender as reply address", companyId);
|
||||||
|
else
|
||||||
|
_logger.LogDebug("Reply-To for company {CompanyId}: {ReplyToEmail}", companyId, email);
|
||||||
|
|
||||||
|
return (email, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user