import { SettingsFormCard, type SettingFieldDef, } from '@/components/admin/shared/settings-form-card'; const FIELDS: SettingFieldDef[] = [ { key: 'email_from_name', label: 'From name', description: 'Display name shown in the From: header on outgoing email.', type: 'string', placeholder: 'Port Nimara', defaultValue: '', }, { key: 'email_from_address', label: 'From address', description: 'Sender email address. Falls back to SMTP_FROM env when blank.', type: 'string', placeholder: 'noreply@example.com', defaultValue: '', }, { key: 'email_reply_to', label: 'Reply-to address', description: 'Optional Reply-To: header for replies (e.g. sales@example.com).', type: 'string', placeholder: 'sales@example.com', defaultValue: '', }, { key: 'email_signature_html', label: 'Default signature (HTML)', description: 'Appended to the bottom of system-generated emails.', type: 'html', placeholder: '


The Port Nimara team

', defaultValue: '', }, { key: 'email_footer_html', label: 'Email footer (HTML)', description: 'Legal/contact footer rendered at the very bottom of all emails.', type: 'html', placeholder: '

© Port Nimara · ul. ...

', defaultValue: '', }, { key: 'smtp_host_override', label: 'SMTP host override', description: 'Optional. Falls back to SMTP_HOST env when blank.', type: 'string', placeholder: 'mail.example.com', defaultValue: '', }, { key: 'smtp_port_override', label: 'SMTP port override', description: 'Optional. Falls back to SMTP_PORT env when blank.', type: 'number', placeholder: '587', defaultValue: null, }, { key: 'smtp_user_override', label: 'SMTP username override', description: 'Optional. Falls back to SMTP_USER env when blank.', type: 'string', defaultValue: '', }, { key: 'smtp_pass_override', label: 'SMTP password override', description: 'Optional. Stored in plain text — only set when overriding env credentials.', type: 'password', defaultValue: '', }, ]; export default function EmailSettingsPage() { return (

Email Settings

Per-port outgoing email configuration. SMTP credentials and the From address default to environment variables when these fields are blank.

); }