diff --git a/src/AuthMailer.php b/src/AuthMailer.php index c6d3168..eb9e6cf 100644 --- a/src/AuthMailer.php +++ b/src/AuthMailer.php @@ -18,7 +18,10 @@ final class AuthMailer { public static function sendVerifyEmail(string $to, string $verifyUrl): bool { $subject = 'Verify your Android Cast account'; - $body = "Open this link to verify your email (valid 24h):\n\n" . $verifyUrl . "\n"; + $link = class_exists('ShortLinksRepository', false) + ? ShortLinksRepository::shortenForOutbound($verifyUrl, 86400) + : $verifyUrl; + $body = "Open this link to verify your email (valid 24h):\n\n" . $link . "\n"; return self::send($to, $subject, $body); }