summaryrefslogtreecommitdiff
path: root/pgweb/util/misc.py
diff options
context:
space:
mode:
authorStephen Frost2017-12-18 14:59:18 +0000
committerMagnus Hagander2017-12-18 14:59:18 +0000
commitdfd46afae4624384da18be6c54af6f0b7d7d1a0b (patch)
treea9a76d3df2e0236479d7458af14ba078b627177b /pgweb/util/misc.py
parent48aadf6815b2c2da25762c026046fec85b6f4e33 (diff)
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
Diffstat (limited to 'pgweb/util/misc.py')
-rw-r--r--pgweb/util/misc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pgweb/util/misc.py b/pgweb/util/misc.py
index 3f436c85..b9f1bf16 100644
--- a/pgweb/util/misc.py
+++ b/pgweb/util/misc.py
@@ -8,10 +8,10 @@ from pgweb.mailqueue.util import send_simple_mail
from pgweb.util.helpers import template_to_string
import re
-def send_template_mail(sender, receiver, subject, templatename, templateattr={}, usergenerated=False, cc=None):
+def send_template_mail(sender, receiver, subject, templatename, templateattr={}, usergenerated=False, cc=None, replyto=None):
send_simple_mail(sender, receiver, subject,
template_to_string(templatename, templateattr),
- usergenerated=usergenerated, cc=cc)
+ usergenerated=usergenerated, cc=cc, replyto=replyto)
def get_client_ip(request):
"""