// Check if SMTP config exists in Firestore // Run with: node check-smtp.js import { initializeApp } from 'firebase/app'; import { getFirestore, doc, getDoc } from 'firebase/firestore'; const firebaseConfig = { apiKey: "AIzaSyAHtvhdtBxNwf0UE3Fp5P0v1vITZKhLMJw", authDomain: "prayer-app-6701f.firebaseapp.com", projectId: "prayer-app-6701f", storageBucket: "prayer-app-6701f.firebasestorage.app", messagingSenderId: "555011794707", appId: "1:555011794707:web:a3d60bdee742578cca1ce6" }; const app = initializeApp(firebaseConfig); const db = getFirestore(app); const checkSMTPConfig = async () => { try { console.log('🔍 Checking SMTP configuration...'); const configDoc = await getDoc(doc(db, 'config', 'smtp')); if (configDoc.exists()) { const config = configDoc.data(); console.log('✅ SMTP config found:'); console.log(' Host:', config.host); console.log(' Port:', config.port); console.log(' Secure:', config.secure); console.log(' User:', config.user ? 'Set' : 'Not set'); console.log(' Pass:', config.pass ? 'Set' : 'Not set'); console.log(' From:', config.from); } else { console.log('❌ SMTP configuration not found in Firestore!'); console.log(' You need to add SMTP config to config/smtp document'); } } catch (error) { console.error('❌ Error checking SMTP config:', error); } }; checkSMTPConfig();