Support for IMAP IDLE in ruby
Posted
by
Asaxena
on Stack Overflow
See other posts from Stack Overflow
or by Asaxena
Published on 2009-07-02T19:01:35Z
Indexed on
2012/10/03
15:37 UTC
Read the original article
Hit count: 184
Ok, I have been suck on it for hours. I thought net/imap.rb with ruby 1.9 supported the idle command, but not yet.
Can anyone help me in implementing that? From here, I though this would work:
class Net::IMAP
def idle
cmd = "IDLE"
synchronize do
tag = generate_tag
put_string(tag + " " + cmd)
put_string(CRLF)
end
end
def done
cmd = "DONE"
synchronize do
put_string(cmd)
put_string(CRLF)
end
end
end
But imap.idle with that just return nil.
© Stack Overflow or respective owner