incident->server?->name ?? '—'; $rule = $this->incident->rule?->name ?? '—'; $prefix = $this->resolved ? __('alerts.mail_subject_resolved') : __('alerts.mail_subject_firing'); return new Envelope(subject: "[{$prefix}] {$rule} — {$server}"); } public function content(): Content { return new Content( text: 'mail.alert', with: [ 'incident' => $this->incident, 'resolved' => $this->resolved, 'server' => $this->incident->server?->name ?? '—', 'rule' => $this->incident->rule?->name ?? '—', 'metric' => $this->incident->rule?->metric ?? '—', 'value' => $this->incident->value, 'threshold' => $this->incident->rule?->threshold ?? 0, ], ); } }