diff options
author | Magnus Hagander | 2014-07-15 10:57:17 +0000 |
---|---|---|
committer | Magnus Hagander | 2014-07-15 10:57:17 +0000 |
commit | 0aa96508ec8a30dbd47eb5f5d31eabeabfc3d9a9 (patch) | |
tree | 5d25d04d5a80ab02292f771ae1b4fd61c86a2e9a /pgcommitfest/commitfest/views.py | |
parent | 4ef258394dbd79aebf63f3981700c6b305190bf5 (diff) |
Include name of cf username causing emails to be sent in the headers
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r-- | pgcommitfest/commitfest/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index 0230c41..b5d6af3 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -279,6 +279,7 @@ def comment(request, cfid, patchid, what): msg['From'] = "%s %s <%s>" % (request.user.first_name, request.user.last_name, request.user.email) msg['Date'] = formatdate(localtime=True) msg['User-Agent'] = 'pgcommitfest' + msg['X-cfsender'] = request.user.username msg['In-Reply-To'] = '<%s>' % form.respid # We just add the "top" messageid and the one we're responding to. # This along with in-reply-to should indicate clearly enough where @@ -464,7 +465,7 @@ def send_email(request, cfid): recipients = User.objects.filter(q).distinct() for r in recipients: - send_simple_mail(request.user.email, r.email, form.cleaned_data['subject'], form.cleaned_data['body']) + send_simple_mail(request.user.email, r.email, form.cleaned_data['subject'], form.cleaned_data['body'], request.user.username) messages.add_message(request, messages.INFO, "Sent email to %s" % r.email) return HttpResponseRedirect('..') else: |