import 'dotenv/config';
import { initializeSmtpConfig } from '../src/services/smtpConfig.service.js';

async function main() {
    const cfg = await initializeSmtpConfig();
    console.log('enabled:', cfg.enabled);
    console.log('source:', cfg.source);
    console.log('host:', cfg.host);
    console.log('port:', cfg.port);
    console.log('user:', cfg.auth.user || '(empty)');
    console.log('pass:', cfg.auth.pass ? `*** (${cfg.auth.pass.length})` : '(empty)');
    console.log('from:', cfg.from);
}

main().catch((e) => {
    console.error(e);
    process.exit(1);
});
