diff --git a/framework/core/src/Install/BaseUrl.php b/framework/core/src/Install/BaseUrl.php index d35b39904..c530f2678 100644 --- a/framework/core/src/Install/BaseUrl.php +++ b/framework/core/src/Install/BaseUrl.php @@ -38,6 +38,15 @@ final class BaseUrl return $this->normalized; } + /** + * Generate a valid e-mail address for this base URL's domain. + * + * This uses the given mailbox name and our already normalized host name to + * construct an email address. + * + * @param string $mailbox + * @return string + */ public function toEmail(string $mailbox): string { $host = preg_replace('/^www\./i', '', parse_url($this->normalized, PHP_URL_HOST));