この行を使用する場合:
m = imaplib.IMAP4("some host")
このエラーが発生します:
m = imaplib.IMAP4("some host")
File "C:\Python25\lib\imaplib.py", line 163, in __init__
self.open(host, port)
File "C:\Python25\lib\imaplib.py", line 230, in open
self.sock.connect((host, port))
File "<string>", line 1, in connect
error: (10061, 'Connection refused')
このエラーのエラー処理をどのように行いますか?