From 0b299b9c54bb8eec32e438c5e41577fe67a4e7fa Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Wed, 15 Oct 2025 19:11:27 -0700 Subject: [PATCH 1/3] remove duplicate custom check - Audit Message Ingestion --- .../Notifications/Email/CustomChecksMailNotification.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ServiceControl/Notifications/Email/CustomChecksMailNotification.cs b/src/ServiceControl/Notifications/Email/CustomChecksMailNotification.cs index bbdaff35db..cb4d5351ed 100644 --- a/src/ServiceControl/Notifications/Email/CustomChecksMailNotification.cs +++ b/src/ServiceControl/Notifications/Email/CustomChecksMailNotification.cs @@ -25,7 +25,6 @@ class CustomChecksMailNotification : IDomainHandler, IDomainH "ServiceControl database", "ServiceControl Remotes", "Error Message Ingestion Process", - "Audit Message Ingestion", "Error Message Ingestion" }; From 34cb9e47682dd800aca59241a30ddd413a673249 Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Wed, 15 Oct 2025 19:21:31 -0700 Subject: [PATCH 2/3] add email notification subject and body to log --- .../Notifications/Email/SendEmailNotificationHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs b/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs index 26f4ac0036..19c7ffc8e9 100644 --- a/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs +++ b/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs @@ -32,6 +32,8 @@ public async Task Handle(SendEmailNotification message, IMessageHandlerContext c notifications = await manager.LoadSettings(cacheTimeout); } + logger.LogInformation("Processing email notification. Subject: {Subject}, Body: {Body}", message.Subject, message.Body); + if (notifications == null || !notifications.Email.Enabled) { logger.LogInformation("Skipping email sending. Notifications turned-off"); From e6d2a637c8ddac8907d91c007fda017f5737c20a Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Thu, 30 Oct 2025 21:45:49 -0700 Subject: [PATCH 3/3] apply code review suggestions --- .../Notifications/Email/SendEmailNotificationHandler.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs b/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs index 19c7ffc8e9..866beb314c 100644 --- a/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs +++ b/src/ServiceControl/Notifications/Email/SendEmailNotificationHandler.cs @@ -36,7 +36,7 @@ public async Task Handle(SendEmailNotification message, IMessageHandlerContext c if (notifications == null || !notifications.Email.Enabled) { - logger.LogInformation("Skipping email sending. Notifications turned-off"); + logger.LogDebug("Skipping email sending. Notifications turned-off"); return; } @@ -59,8 +59,7 @@ public async Task Handle(SendEmailNotification message, IMessageHandlerContext c if (context.MessageId == throttlingState.RetriedMessageId) { - message.Body += - "\n\nWARNING: Your SMTP server was temporarily unavailable. Make sure to check ServicePulse for a full list of health check notifications."; + message.Body += "\n\nWARNING: Your SMTP server was temporarily unavailable. Make sure to check ServicePulse for a full list of health check notifications."; } await emailSender.Send(notifications.Email, message.Subject, message.Body, emailDropFolder);