coool
coool

Reputation: 8297

nodejs telnet connection undetermined

I using email-existence node module to check if an email exists.but it is not able to determine the response from the server.The github address is https://github.com/nmanousos/email-existence/blob/master/index.js Here is the code that is not getting triggered

conn.on('prompt', function () {

is there something called prompt...

the following is getting triggered...

conn.on('undetermined', function ()

what is happening..

Upvotes: 0

Views: 228

Answers (1)

loganfsmyth
loganfsmyth

Reputation: 161477

I don't know the module, but looking at the the code below what you posted:

if(data.indexOf("220") != -1 || data.indexOf("250") != -1) {
  conn.emit('prompt');
} else if(data.indexOf("550") != -1) {
  conn.emit('false');
} else {
  conn.emit('undetermined');
}

So it must be that data, the value returned from the SMTP server, is not returning one of the expected values.

Upvotes: 1

Related Questions