From 41ee4c2a667b635a0ec43348d048b664c897166a Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Tue, 30 Jun 2026 17:42:05 +0530 Subject: [PATCH] fix(ssl): honor updated le-mail on certificate renewal --- src/helper/Site_Letsencrypt.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helper/Site_Letsencrypt.php b/src/helper/Site_Letsencrypt.php index 0669eaf1..61f47cc4 100644 --- a/src/helper/Site_Letsencrypt.php +++ b/src/helper/Site_Letsencrypt.php @@ -691,6 +691,9 @@ private function getOrCreateDistinguishedName( $domain, array $alternativeNames, if ( $this->repository->hasDomainDistinguishedName( $domain ) ) { $original = $this->repository->loadDomainDistinguishedName( $domain ); + // Honor an updated le-mail on renewal; fall back to stored email only when none is passed. + $email_address = ! empty( $email ) ? $email : $original->getEmailAddress(); + $distinguishedName = new DistinguishedName( $domain, $original->getCountryName(), @@ -698,7 +701,7 @@ private function getOrCreateDistinguishedName( $domain, array $alternativeNames, $original->getLocalityName(), $original->getOrganizationName(), $original->getOrganizationalUnitName(), - $original->getEmailAddress(), + $email_address, $alternativeNames ); } else {