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