Refactor admin dashboard and fix mobile phone input dropdown
All checks were successful
Build And Push Image / docker (push) Successful in 2m54s
All checks were successful
Build And Push Image / docker (push) Successful in 2m54s
- Simplify admin dashboard by consolidating configuration sections - Fix mobile dropdown display issues in PhoneInputWrapper component - Add proper flex layout and minimum height for mobile country list - Update email configuration and testing functionality - Remove redundant configuration cards in favor of unified portal settings
This commit is contained in:
@@ -51,16 +51,18 @@ export default defineEventHandler(async (event) => {
|
||||
const { getEmailService } = await import('~/server/utils/email');
|
||||
const emailService = await getEmailService();
|
||||
|
||||
// Verify connection first
|
||||
const connectionOk = await emailService.verifyConnection();
|
||||
if (!connectionOk) {
|
||||
throw createError({
|
||||
statusCode: 500,
|
||||
statusMessage: 'SMTP connection verification failed. Please check your SMTP configuration.'
|
||||
});
|
||||
// Try to verify connection but don't fail if verification doesn't work
|
||||
// Some SMTP servers have issues with verify() but work fine for sending
|
||||
try {
|
||||
const connectionOk = await emailService.verifyConnection();
|
||||
if (connectionOk) {
|
||||
console.log('[api/admin/test-email.post] SMTP connection verified successfully');
|
||||
}
|
||||
} catch (verifyError: any) {
|
||||
console.warn('[api/admin/test-email.post] SMTP verification failed, attempting to send anyway:', verifyError.message);
|
||||
}
|
||||
|
||||
// Send test email
|
||||
// Attempt to send test email regardless of verification result
|
||||
await emailService.sendTestEmail(body.testEmail);
|
||||
|
||||
console.log('[api/admin/test-email.post] ✅ Test email sent successfully');
|
||||
|
||||
Reference in New Issue
Block a user