From: Matthijs Kooijman Date: Fri, 1 Feb 2008 09:24:05 +0000 (+0100) Subject: * Fix an off-by-one error when splitting an email in headers and body. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fxerxes.git;a=commitdiff_plain;h=13b3711fe468e074a38f47fcdc4b9a18ac993650 * Fix an off-by-one error when splitting an email in headers and body. --- diff --git a/tools/notify.py b/tools/notify.py index 08bc477..8dca1ba 100644 --- a/tools/notify.py +++ b/tools/notify.py @@ -23,7 +23,7 @@ def notify(recipients, template, context = {}): context['addresses'] = addresses rendered = loader.render_to_string(template, context) - (headers, body) = rendered.split('\n\n', 2) + (headers, body) = rendered.split('\n\n', 1) # Turn the headers into a dict so EmailMessage can turn them into a # string again. Bit pointless, but it works.