mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-12-06 08:03:46 +00:00
* feat(email): add Resend delivery provider Add Resend as an alternative to SMTP with separately editable sender address and name, credential-safe configuration status, and validation before activation. Preserve the target repository's email notification and balance reminder settings. Only Resend changes are transplanted from hicoderai/new-api; no landing, legal-document, model-group, pricing, branding, or dependency changes are included. Validation: Go common/controller email regression tests; 19 frontend email and notification tests; frontend production build; tsgo typecheck; touched-file lint. Frontend validation uses the target lockfile's Axios 1.18.1 with local cached tools. Security references: OWASP Authentication, Session Management, and Forgot Password Cheat Sheets. Tests cover credential non-disclosure, invalid activation, sanitized transport errors, and no automatic retry or fallback; token and session flows are unchanged. https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html * fix(email): log Resend rejections and translate Resend errors Resend's reason for a rejected or failed send now goes to the server log. People who asked for the email still see the short error. Resend and email method errors are translatable messages in all seven languages. The email settings hints are shorter and reuse the existing key hint. The new frontend files carry the license header, the sender name check passes lint, and test fixtures use neutral names. * fix(email): check Resend settings while Resend is active Saving the sender address or API key now checks the whole Resend setup while Resend sends the mail. A typo the form accepts, such as notify..team@example.com, is rejected instead of breaking every send. Resend's error text and network errors are quoted in the server log. --------- Co-authored-by: CaIon <i@caion.me>