diff options
Diffstat (limited to 'scripts/notify.py')
-rwxr-xr-x | scripts/notify.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/notify.py b/scripts/notify.py index 9a9cc29..b5bf518 100755 --- a/scripts/notify.py +++ b/scripts/notify.py @@ -36,8 +36,10 @@ def headers_reply(thread_id): return {'In-Reply-To': thread_id, 'References': thread_id} def send_notification(to, subject, body, refs, headers={}): - body = '\n'.join([textwrap.fill(line) for line in body.splitlines()]) - body += '\n\n' + refs + wrapped = '' + for line in body.splitlines(): + wrapped += textwrap.fill(line, break_long_words=False) + '\n' + body = wrapped + '\n' + refs for recipient in to: msg = email.mime.text.MIMEText(body, 'plain', 'utf-8') |