summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/qmauth.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/qmauth.py b/script/qmauth.py
index 052b8dd..0c63c7d 100755
--- a/script/qmauth.py
+++ b/script/qmauth.py
@@ -202,7 +202,9 @@ def count_mails(f, subfolder):
def _get_body(mail):
if not mail.is_multipart():
if mail.get_content_maintype() == 'text':
- return mail.get_payload(decode=True).decode(errors='replace')
+ return mail.get_payload(decode=True).decode(
+ encoding=mail.get_content_charset(failobj='utf-8'),
+ errors='replace')
else:
return mail.get_payload()