Skip to content

Commit

Permalink
Merge pull request #15 from thekix/master
Browse files Browse the repository at this point in the history
imaplib expect bytes in the append
  • Loading branch information
thekix committed Oct 25, 2020
2 parents 5e7b006 + 442c88d commit c850e74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion offlineimap/folder/IMAP.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def savemessage(self, uid, content, flags, rtime):
# Do the APPEND.
try:
(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()
# will raise an exception for 'BAD' responses:
if typ != 'OK':
Expand Down

0 comments on commit c850e74

Please sign in to comment.