num = str(x_gm_msgid).encode()
result, raw_imap_msg_data = self.srv.uid('FETCH', num, "(RFC822 X-GM-MSGID)")
i keep getting an exception on some (not all) x-gm-msgid numbers is there someone around here that might have some insight on the cause to this issue? ive been looking at this line of code for a week without positive results.
Error during email fetch attempt 1: UID command error: BAD [b'Could not parse command']
i have tried both the fetch() method and the uid(). UIDPLUS is not supported by the server. its a gmail server hence the X-GM-MSGID lookups.
value of num at time of exception is: b'1760934730365233422' which looks to be valid. the only thing i can think of is that the ID doesnt exisat on the server side (which is concerning since i just got the ID from the server using a search and fetch. the mailbox has been selected and the state of the connection is self.srv.state = 'SELECTED' the only thing i can think of the select() method i didnt set the readonly flag to False