refactor: reorganize email sending logic and centralize mail functionality

- Updated the `index.ts` file to export the `send` function from the new `mail.ts` file, improving code organization.
- Introduced `mail.ts` to encapsulate the email sending logic, including template rendering and error handling, enhancing modularity and maintainability.
- Implemented a structured approach for sending emails with templates or direct content, streamlining the email functionality.
This commit is contained in:
javayhu 2025-03-16 10:27:40 +08:00
parent 657e5212f4
commit 9b221f4583
2 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
// Export the send function for direct import
export { send } from './utils/send';
export { send } from './mail';
// Export mail templates
export { EmailTemplates } from './emails';