Make email service initialization asynchronous
All checks were successful
Build And Push Image / docker (push) Successful in 3m10s
All checks were successful
Build And Push Image / docker (push) Successful in 3m10s
Convert getEmailService() to async function and update all callers to use await. Replace synchronous require() with dynamic import() for admin-config module. Add SMTP config loading to admin configuration dialog.
This commit is contained in:
@@ -49,7 +49,7 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
// Get email service and send test email
|
||||
const { getEmailService } = await import('~/server/utils/email');
|
||||
const emailService = getEmailService();
|
||||
const emailService = await getEmailService();
|
||||
|
||||
// Verify connection first
|
||||
const connectionOk = await emailService.verifyConnection();
|
||||
|
||||
Reference in New Issue
Block a user