mendicant-original / newman

Newman: a microframework for building email-based applications.
116 stars 11 forks source link

add imap exception logging to Server#tick #33

Closed ericgj closed 12 years ago

ericgj commented 12 years ago

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.

practicingruby commented 12 years ago

Introducing a timeout might be a good idea, but I pulled this in for now. Thanks!

ericgj commented 12 years ago

Yeah ok to close for now. The behavior I was seeing isn't a good measure, on since Google probably has me on some kind of IMAP blacklist by now :O

practicingruby commented 12 years ago

@ericgj: I had a weird behavior when I wasn't setting the right port or turning on SSL or something like that which I can't remember. But I'm pretty sure it just hung indefinitely.