Fixed up the IMAP client code to the point where it's possible to fetch messages!