def list_folders(self): imap = ImapStorage(self.config, self.request.POST) f = imap.list_folders() return { 'result': f, 'error': None }
def list_messages(self, name): data = {'folder': name} data.update(self.request.POST) print data imap = ImapStorage(self.config, data) return { 'result': imap.list_messages(), 'error': None }
def get_message(self, mid): imap = ImapStorage(self.config, self.request.POST) return { 'result': imap.get_message(mid), 'error': None }