From b424e9b9b347b4d4762cdd021f099b11e24609d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadas=20Ustinavi=C4=8Dius?= Date: Fri, 15 Dec 2017 20:43:09 +0200 Subject: [PATCH 1/2] Fix bug where MAX_ADDRESS_LENGTH is missing in flanker library It appears, that some of flanker library versions do not provide MAX_ADDRESS_LENGTH variable, this patch fixes this issue. --- inbox/sendmail/message.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inbox/sendmail/message.py b/inbox/sendmail/message.py index 685d5fc02..0db8bfd7b 100644 --- a/inbox/sendmail/message.py +++ b/inbox/sendmail/message.py @@ -20,7 +20,10 @@ from flanker.addresslib import address from flanker.addresslib.quote import smart_quote from flanker.mime.message.headers.encoding import encode_string -from flanker.addresslib.parser import MAX_ADDRESS_LENGTH +try: + from flanker.addresslib.parser import MAX_ADDRESS_LENGTH +except: + MAX_ADDRESS_LENGTH = 25 from html2text import html2text VERSION = pkg_resources.get_distribution('inbox-sync').version From 4e176ac107197a5a9e98e418cc37aa0414147ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadas=20Ustinavi=C4=8Dius?= Date: Fri, 15 Dec 2017 23:30:54 +0200 Subject: [PATCH 2/2] Update message.py --- inbox/sendmail/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inbox/sendmail/message.py b/inbox/sendmail/message.py index 0db8bfd7b..097b9afd0 100644 --- a/inbox/sendmail/message.py +++ b/inbox/sendmail/message.py @@ -23,7 +23,7 @@ try: from flanker.addresslib.parser import MAX_ADDRESS_LENGTH except: - MAX_ADDRESS_LENGTH = 25 + MAX_ADDRESS_LENGTH = 1024 from html2text import html2text VERSION = pkg_resources.get_distribution('inbox-sync').version