mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
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:

committed by
Magnus Hagander

parent
48aadf6815
commit
dfd46afae4
@ -7,7 +7,7 @@ from email import encoders
|
||||
|
||||
from models import QueuedMail
|
||||
|
||||
def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, usergenerated=False, cc=None):
|
||||
def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, usergenerated=False, cc=None, replyto=None):
|
||||
# attachment format, each is a tuple of (name, mimetype,contents)
|
||||
# content should be *binary* and not base64 encoded, since we need to
|
||||
# use the base64 routines from the email library to get a properly
|
||||
@ -18,6 +18,8 @@ def send_simple_mail(sender, receiver, subject, msgtxt, attachments=None, userge
|
||||
msg['From'] = sender
|
||||
if cc:
|
||||
msg['Cc'] = cc
|
||||
if replyto:
|
||||
msg['Reply-To'] = replyto
|
||||
msg['Date'] = formatdate(localtime=True)
|
||||
msg['Message-ID'] = make_msgid()
|
||||
|
||||
|
Reference in New Issue
Block a user