def del_msg(uid: str, con: imaplib.IMAP4_SSL) -> Optional[bool]: try: status, data = con.uid('STORE', uid, '+FLAGS', '(\Deleted)') if status == 'OK': status, data = con.expunge() return status == "OK" except Exception as error: logging.error(error)
def del_msg(uid: str, con: imaplib.IMAP4_SSL) -> Optional[bool]: try: status, data = con.uid('STORE', uid, '+FLAGS', '(\Deleted)') if status == 'OK': status, data = con.expunge() return status == "OK" except Exception as error: logging.error(error)