mendicant-university/newman — pull request #33 by ericgj (2012-02-21 23:10:31+00:00)
Title: add imap exception logging to Server#tick

For #25.

Rescued Exception rather than StandardException, since IMAP could throw all kinds of shit including socket errors.

I don't know if it quite works though, as I tried a couple obvious things like using a bad email address/password and it seems to just hang somewhere in Net::IMAP.new. Don't really understand why they do this but could this be the culprit:

@receiver_thread = Thread.start {
begin
receive_responses
rescue Exception
end
}

Anyway I guess you could put a timeout on our mailer#messages, although that seems weird.