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:
parent
657e5212f4
commit
9b221f4583
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user