Send -bugs and -docs emails from noreply address

Sending from the submitters address runs afoul to DMARC and other
restrictions. Instead, send the email from a defined noreply address.
Instead, add the original submitter to both the Cc and the Reply-To
header, to make sure they receive followups.

Patch by Stephen, minor changes by Magnus
This commit is contained in:
Stephen Frost
2017-12-18 15:59:18 +01:00
committed by Magnus Hagander
parent 48aadf6815
commit dfd46afae4
7 changed files with 15 additions and 6 deletions

View File

@ -133,7 +133,7 @@ def commentform(request, itemid, version, filename):
form = DocCommentForm(request.POST)
if form.is_valid():
send_template_mail(
form.cleaned_data['email'],
settings.DOCSREPORT_NOREPLY_EMAIL,
settings.DOCSREPORT_EMAIL,
'%s' % form.cleaned_data['shortdesc'],
'docs/docsbugmail.txt', {
@ -142,6 +142,8 @@ def commentform(request, itemid, version, filename):
'details': form.cleaned_data['details'],
},
usergenerated=True,
cc=form.cleaned_data['email'],
replyto='%s, %s' % (form.cleaned_data['email'], settings.DOCSREPORT_NOREPLY_EMAIL),
)
return render_to_response('docs/docsbug_completed.html', {
}, NavContext(request, 'docs'))