-
Notifications
You must be signed in to change notification settings - Fork 123
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
Unable to call any command because of 'Uknown command <something>' #16
Comments
There is a working implementation on top of browserbox that accumulates many of its features in a somewhat opinionated high-level api, so you might want to have a look at that: https://github.com/whiteout-io/imap-client Regarding your code examples: Second: Please let me know if that helped. |
The module is not synchronous, just as Felix already stated – you have to wait for the callback before you can make the next command. What happens with your code is the following:
To fix this, your code should be like this: client.connect();
client.onauth = function() {
client.listMailboxes(function(err, mailboxes) {
console.log(err || mailboxes);
client.selectMailbox(mailbox, function(err, mailbox) {
console.log(err || 'Mailbox was successfully changed to ' + mailbox);
});
});
}; In this case the commands are completely different:
Remember that in addition of I'll close this issue as it is not a bug but feel free to ask if you have any further questions. |
So, the code is:
When I'm trying to execute it, I'm getting something like this:
Note, that this value j1mb3779317lae changes all the time.
May be, it should give at least more friendly response?
UPD:
May be it will by useful. Executing this one:
gives me following stackstrace:
The text was updated successfully, but these errors were encountered: