-
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
Problems retrieving maillboxes object when listing mailboxes #98
Comments
Can someone please help me out here? |
I believe the problem you are having is the client is closing before the response is returned.
|
nit: Note that unless ImapClient is now automatically binding its methods, you'd need to do something like client.listMailboxes.bind(client) and client.close.bind(client) or wrap them in arrow-functions too like |
Good catch @asutherland :-) |
|
Hi, I'm trying to use the
listMailboxes()
method of the imap client. Here is what I'm trying to do:It runs fine, outputs the server responses in the terminal saying I've connected and it's listing mailboxes, and closes up without errors. The problem I'm having is that I can't seem to actually use the
mailboxes
object once it has gotten a response from the server.It may be because of this notation in the readme:
I am really unfamiliar with what's going on here. I understand
then()
is supposed to run a function once it's done, but I have never seen the() => { ... }
notation before. It looks like it may just be shorthand forfunction(){ }
but I'm just not used to that. Maybe that isn't what's causing the problems for me.The text was updated successfully, but these errors were encountered: