feat: enhance email configuration and validation features

- Implemented mutual exclusivity for SSL and TLS options in the email configuration.
- Added comprehensive validation for required fields, port range, email format, and password requirements.
- Updated the backend to support reversible encryption for SMTP passwords, ensuring secure handling of sensitive data.
- Introduced loading states and improved user feedback in the email configuration UI for better user experience.
This commit is contained in:
2025-11-03 23:51:57 -03:00
parent 3d8f907fa5
commit ce24190b1a
7 changed files with 310 additions and 42 deletions

View File

@@ -471,7 +471,7 @@ export default defineSchema({
servidor: v.string(), // smtp.gmail.com
porta: v.number(), // 587, 465, etc.
usuario: v.string(),
senhaHash: v.string(), // senha criptografada
senhaHash: v.string(), // senha criptografada reversível (AES-GCM) - necessário para descriptografar e usar no SMTP
emailRemetente: v.string(),
nomeRemetente: v.string(),
usarSSL: v.boolean(),