Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call method 'on' of undefined #4

Closed
eps90 opened this issue Jan 28, 2013 · 1 comment
Closed

Cannot call method 'on' of undefined #4

eps90 opened this issue Jan 28, 2013 · 1 comment

Comments

@eps90
Copy link

eps90 commented Jan 28, 2013

Hi. I've installed mail-listener via npm. When I tried to run example script from README in plain JavaScript it worked fine. But when I send test email into my email box, application crashed and I got error:

28 Jan 19:48:13 - successfully connected to mail server
imap Connected
28 Jan 19:48:14 - successfully opened mail box
28 Jan 19:48:44 - new mail arrived with id 1
28 Jan 19:48:44 - found 1 emails

/home/kuba/testy/mailparser/node_modules/mail-listener/dist/mail.listener.js:65
                    return fetch.on("message", function(msg) {
                                 ^
TypeError: Cannot call method 'on' of undefined
    at ImapConnection.MailListener.start (/home/kuba/testy/mailparser/node_modules/mail-listener/dist/mail.listener.js:65:34)
    at ondata (/home/kuba/testy/mailparser/node_modules/mail-listener/node_modules/imap/lib/imap.js:675:30)
    at CleartextStream.ondata (/home/kuba/testy/mailparser/node_modules/mail-listener/node_modules/imap/lib/imap.js:602:16)
    at CleartextStream.EventEmitter.emit (events.js:96:17)
    at CleartextStream.CryptoStream._push (tls.js:540:12)
    at SecurePair.cycle (tls.js:898:20)
    at EncryptedStream.CryptoStream.write (tls.js:285:13)
    at Socket.ondata (stream.js:38:26)
    at Socket.EventEmitter.emit (events.js:96:17)
    at TCP.onread (net.js:397:14)
@podviaznikov
Copy link
Contributor

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants