/** Texto canónico — não depender de sessões antigas em cache. */ export const CLIENT_SMTP_NOTE = 'Use a porta 465 com SSL/TLS para envio. Não use a porta 587.' export function normalizeClientSettings(raw) { if (!raw || typeof raw !== 'object') return null const note = String(raw.smtp_note || '') const legacy = /partilhad/i.test(note) || /ibytera/i.test(note) || /587.*domínio/i.test(note) return legacy ? { ...raw, smtp_note: CLIENT_SMTP_NOTE } : raw }