renderFromTemplate('admin_hosting_account_created', $this->vars())['subject'],
);
}
public function content(): Content
{
return new Content(
htmlString: $this->renderFromTemplate('admin_hosting_account_created', $this->vars())['html'],
);
}
public function attachments(): array
{
return [];
}
private function vars(): array
{
$row = fn (string $label, ?string $value) => $value
? '
' . $label . '' . e($value) . '
'
: '';
return [
'domain_name' => $this->data['domain_name'] ?? 'N/A',
'created_at' => $this->data['created_at'] ?? now()->format('d/m/Y H:i:s'),
'customer_name' => $this->data['customer_name'] ?? 'N/A',
'customer_email' => $this->data['customer_email'] ?? 'N/A',
'hosting_plan' => $this->data['hosting_plan'] ?? 'N/A',
'server_name' => $this->data['server_name'] ?? 'N/A',
'server_ip' => $this->data['server_ip'] ?? 'N/A',
'plesk_client_id' => $this->data['plesk_client_id'] ?? 'N/A',
'plesk_subscription_id' => $this->data['plesk_subscription_id'] ?? 'N/A',
'ftp_username' => $this->data['ftp_username'] ?? 'N/A',
'ftp_password_row' => $row('🔑 FTP Password', $this->data['ftp_password'] ?? null),
'plesk_panel_url' => $this->data['plesk_panel_url'] ?? 'N/A',
'plesk_login' => $this->data['plesk_login'] ?? 'N/A',
'plesk_password_row' => $row('🔑 Password', $this->data['plesk_password'] ?? null),
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
];
}
}