mailbot
mailbot copied to clipboard
Update mailbot.py
FIX: string access on byte sequence and type cast for invocation of mail message function
Thanks @nnako for your work! However, I don't think the key itself should be bytes, should it? According to the py33 test in travis, the key doesn't exist.
The py27 test needs fixing, because it's mocked. If you need help fixing those two test failures, please let me know.
+1 on this pull: from the IMAPClient documentation, in Python 3 it returns messages as byte arrays, instead of strings as in Python 2. The patch is needed to have it working on Python 3.