diff --git a/test/groovy/MailSendNotificationTest.groovy b/test/groovy/MailSendNotificationTest.groovy index 4b3573bbe..7760748fe 100644 --- a/test/groovy/MailSendNotificationTest.groovy +++ b/test/groovy/MailSendNotificationTest.groovy @@ -41,6 +41,7 @@ class MailSendNotificationTest extends BasePiperTest { user1@domain.com noreply+github@domain.com user3@domain.com noreply+github@domain.com user2@domain.com user1@domain.com +user1@noreply.domain.com user1@domain.com noreply+github@domain.com user3@domain.com noreply+github@domain.com user3@domain.com noreply+github@domain.com diff --git a/vars/mailSendNotification.groovy b/vars/mailSendNotification.groovy index a139ed1fb..515671a1e 100644 --- a/vars/mailSendNotification.groovy +++ b/vars/mailSendNotification.groovy @@ -240,7 +240,7 @@ def getDistinctRecipients(recipients){ address = address.trim() if(address && address.contains("@") - && !address.startsWith("noreply") + && !address.contains("noreply") && !knownAddresses.contains(address)) { knownAddresses.add(address) }