Merge pull request #15 from thekix/master

imaplib expect bytes in the append
This commit is contained in:
Rodolfo García Peñas (kix) 2020-10-25 20:38:03 +01:00 committed by GitHub
commit c850e745cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -666,7 +666,7 @@ class IMAPFolder(BaseFolder):
# Do the APPEND. # Do the APPEND.
try: try:
(typ, dat) = imapobj.append(self.getfullIMAPname(), (typ, dat) = imapobj.append(self.getfullIMAPname(),
imaputil.flagsmaildir2imap(flags), date, content) imaputil.flagsmaildir2imap(flags), date, bytes(content, 'utf-8'))
# This should only catch 'NO' responses since append() # This should only catch 'NO' responses since append()
# will raise an exception for 'BAD' responses: # will raise an exception for 'BAD' responses:
if typ != 'OK': if typ != 'OK':