def run(self, imap_obj: imaplib.IMAP4): """Executes Executes IMAP UNSELECT cammand can be used to close the current mailbox in an IMAP server Raises: ImapRuntimeError - if command executions failed :param imap_obj: imaplib.IMAP4 :return: None """ self.check_response(*imap_obj.xatom('UNSELECT'))
def run(self, imap_obj: imaplib.IMAP4): """Sends IMAP ID command. Raises: ImapRuntimeError - if command executions failed :param imap_obj: imaplib.IMAP4 :return: ServerInfo """ typ, data = imap_obj.xatom( 'ID', '("name" "{}" "version" "{}")'.format(__description__, __version__)) self.check_response(typ, data) data = self.parse_string_pair(self.untagged_value(imap_obj, 'ID', '')) return from_id_command(data, imap_obj.host, imap_obj.port)
def run(self, imap_obj: imaplib.IMAP4): """Executes Executes IMAP X-SCALIX-ID. Raises: ImapRuntimeError - if command executions failed :param imap_obj: imaplib.IMAP4 :return: dict """ arg = '("name" "{}" "version" "{}" all-sender-ia "")'.format( __description__, __version__) typ, data = imap_obj.xatom('X-SCALIX-ID', arg) self.check_response(typ, data) return self.parse_string_pair( self.untagged_value(imap_obj, 'X-SCALIX-ID', ''))