7980f7ff1a
The function Internaldate2epoch needs a bytes argument, not an string, we need encode it: imaplibutil.Internaldate2epoch(messagestr.encode('utf-8'))