IMAP fetch() returns command error: BAD [b' Command Argument Error. 12']
问题 I'm having trouble finding examples/troubleshooting tips online, and am not quite sure that I'm interpreting the documentation correctly. Any assistance would be greatly appreciated. I'm connecting to an e-mail server, and want to read the e-mail subjects, and bodies. I first make my connection like so: import imaplib c = imaplib.IMAP4_SSL(hostname, port) c.login(username, password) foldername = 'INBOX/SSR' c.select(str.encode(foldername), readonly = True) today = datetime.date.today()