-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add IMAP listeners on "close" and "error" #22
Comments
Mail listener already emit these events. See if below example makes sense to you.
|
@chirag04 |
@chirag04 |
Ok. got it. I will leave this to @podviaznikov |
@chirag04 @podviaznikov |
But... After ~2 hour I send a second mail, it was parsed correctly and listener working else few minute and than shutted down with unhandled error:
And I think this error should be handled next way:
And I started listener again... |
@anotheri till then you might want to start your script with forever. Shall give you some good sleep. Haha :) |
@chirag04 thanks for realy good advice. ) but now i want test it without forever. this (forever) is my ace in the hole. =)) |
@chirag04 And, as i sad yesterday, listener was shutted down with only output:
that I define into this block:
In this case |
Not sure if this is relevant but i tried to start mail-listener and kept it on server. Its still connected and running from last 5hours. |
Add please two imap listeners and emits. Something like this:
After
@emit "server:connected"
:I think it may have another predefine handlers by default (stop mailListener, for example, or restart it, or something other). But i need opportunity to set handlers on this events from listeners for mail-listener class like this:
The text was updated successfully, but these errors were encountered: