Na produção, a 04/12/2026, o servidor de correio respondeu 550 «User unknown» e o registo, já gravado, terminou em erro 500. A falha de envio do email de confirmação passa a ficar registada e o investidor entra no portal; pode pedir novo envio na página de confirmação. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jM
This commit is contained in:
@@ -13,6 +13,7 @@ use Illuminate\Support\Carbon;
|
||||
use Laravel\Fortify\Contracts\PasskeyUser;
|
||||
use Laravel\Fortify\PasskeyAuthenticatable;
|
||||
use Laravel\Fortify\TwoFactorAuthenticatable;
|
||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -35,6 +36,21 @@ class User extends Authenticatable implements MustVerifyEmail, PasskeyUser
|
||||
/** @use HasFactory<UserFactory> */
|
||||
use HasFactory, Notifiable, PasskeyAuthenticatable, TwoFactorAuthenticatable;
|
||||
|
||||
/**
|
||||
* A mail server that refuses or fails (unknown mailbox, mistyped address,
|
||||
* server down) must not turn a completed registration into an HTTP 500.
|
||||
* The account exists; the failure is reported and the investor can ask
|
||||
* for the email again from the verification page, which uses this path.
|
||||
*/
|
||||
public function sendEmailVerificationNotification(): void
|
||||
{
|
||||
try {
|
||||
parent::sendEmailVerificationNotification();
|
||||
} catch (TransportExceptionInterface $error) {
|
||||
report($error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user