import { searchMessages, getProfile } from './dist/imap.js';

async function main() {
  try {
    console.log('Profile:', await getProfile('gmail'));
    const results = await searchMessages('test', 5, 'gmail');
    console.log('Results:', JSON.stringify(results, null, 2));
  } catch (err) {
    console.error('ERROR:', err.message);
    console.error(err.stack);
  }
}
main();
