node-imap
node-imap copied to clipboard
ECONNREFUSED error while trying to use imap
Hello. I am currently using Visual Studio Code with 18.16.0 Node. I am trying to use imap, but it keeps saying the error is "ECONNREFUSED". What might be the cause of this? I am providing the right details. Or should be at least.
var Imap = require('imap'),
inspect = require('util').inspect;
var imap = new Imap({
user: '[email protected]',
password: 'gmailpass',
host: 'imap.gmail.com',
port: 993,
tls: true
});
Full error message:
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: 'xxxxx',
port: 993,
source: 'socket'
Check any firewalls or security software you have in place. Something is blocking your traffic.