From 732a9d55d842b71fc648beeb2c44c70c1157f786 Mon Sep 17 00:00:00 2001
From: Guido Trotter <guido@hudson-trading.com>
Date: Thu, 4 Jun 2026 12:22:53 -0400
Subject: [PATCH] email_test.go: check the error message with a regexp allowing
 an optional quote introduced in go 1.26.4

Signed-off-by: Guido Trotter <guido@hudson-trading.com>
---
 notify/email/email_test.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/notify/email/email_test.go b/notify/email/email_test.go
index 95fcd440d5..9e7d8f3278 100644
--- a/notify/email/email_test.go
+++ b/notify/email/email_test.go
@@ -575,7 +575,7 @@ func TestEmailNotifyWithAuthentication(t *testing.T) {
 				cfg.Hello = "invalid hello string"
 			},
 
-			errMsg: "501 Error",
+			errMsg: "501",
 			retry:  true,
 		},
 	} {
@@ -733,7 +733,8 @@ func TestEmailRejected(t *testing.T) {
 
 	// Send the alert to mock SMTP server.
 	retry, err := e.Notify(context.Background(), firingAlert)
-	require.ErrorContains(t, err, "501 5.5.4 Rejected!")
+	require.ErrorContains(t, err, "501")
+	require.ErrorContains(t, err, "5.5.4")
 	require.True(t, retry)
 	require.NoError(t, srv.Shutdown(ctx))
 
