- Magic-Link-Login übergibt bei aktiviertem 2FA an die 2FA-Challenge, statt sie zu umgehen (M1). - Bestätigungs-/Benachrichtigungs-Mails (Kontakt, Recht, Kündigung, Widerruf, Magic-Link) laufen als ShouldQueue+afterCommit über die Queue, damit die Response nicht am SMTP-Roundtrip hängt. Hinweis: Der Queue-Worker muss im Betrieb laufen und überwacht werden, da fristrelevante Bestätigungen darüber zugestellt werden (siehe Betriebsüberwachung). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
978 B
PHP
36 lines
978 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\WithdrawalRequest;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
/**
|
|
* Sofortige automatische Eingangsbestätigung an den Verbraucher — gesetzlich
|
|
* vorgeschrieben beim Online-Widerruf (Widerrufsbutton).
|
|
*/
|
|
class WithdrawalRequestReceived extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(
|
|
public readonly WithdrawalRequest $withdrawalRequest,
|
|
) {}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: 'Eingangsbestätigung: Ihr Widerruf vom '.$this->withdrawalRequest->created_at->format('d.m.Y'),
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(view: 'emails.withdrawal.received');
|
|
}
|
|
}
|