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 { // Branded HTML (table layout, inline styles, CID-embedded logo — no external assets, so it // renders in Gmail/Outlook without image blocking) + the plain-text part as fallback. return new Content( html: 'mail.alert-html', 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, ], ); } }