Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mongoose.connect(env.mongo.host, {useMongoClient: true});
- User.find((err, users) => {
- if (err) return console.error(err);
- if (users) {
- const connections = [];
- users.forEach((user) => {
- connections.push(
- imapConnectionFactory(user.username, user.password)
- )
- });
- connections.map((connection) => {
- connection.once('ready', () => console.log('connected'))
- connection.connect();
- })
- }
- });
- const users = [{username: 'correct_username', password: 'correct_password'}];
- const connections = [];
- users.forEach((user) => {
- connections.push(
- imapConnectionFactory(user.username, user.password)
- )
- });
- connections.map((connection) => {
- connection.once('ready', () => console.log('connected'))
- connection.connect();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement