Suppress environment prefix in email subjects on Production
[ENV_NAME] prefix is now only prepended in non-production environments (Development, Staging, etc.). Production emails get a clean subject line. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,9 @@ public sealed class SmtpEmailDispatcher
|
||||
if (!string.IsNullOrWhiteSpace(req.ReplyTo))
|
||||
msg.ReplyTo.Add(MailboxAddress.Parse(req.ReplyTo));
|
||||
|
||||
msg.Subject = $"[{_environmentName}] {req.Subject}".Trim();
|
||||
msg.Subject = string.Equals(_environmentName, "Production", StringComparison.OrdinalIgnoreCase)
|
||||
? req.Subject.Trim()
|
||||
: $"[{_environmentName}] {req.Subject}".Trim();
|
||||
|
||||
var shellStart = _templates.Get("email.html-shell.start", "*");
|
||||
var shellEnd = _templates.Get("email.html-shell.end", "*");
|
||||
|
||||
Reference in New Issue
Block a user