mailer('cp_'.MailPurpose::SYSTEM); } public function envelope(): Envelope { return $this->mailboxEnvelope( MailPurpose::SYSTEM, __('security.mail_subject'), 'security-block', ); } public function content(): Content { // instance() statt eines eigenen Customer-Parameters: der Aufrufer // (BlockAddress) hat ohnehin nur den Datensatz, und ein zweiter Weg, // an dieselbe Instanz zu kommen, wäre eine zweite Stelle, an der der // Name veralten könnte. $customer = $this->block->instance?->customer; return new Content(view: 'mail.security-block', with: [ 'name' => (string) ($customer?->contact_name ?: $customer?->name ?: ''), 'ip' => $this->block->ip, 'attempts' => $this->block->attempts, 'blockedAt' => $this->block->blocked_at, 'expiresAt' => $this->block->expires_at, 'securityUrl' => route('portal.security'), ]); } }