Improve From: in emails from todo.sr.ht

This commit is contained in:
Drew DeVault 2018-09-30 12:41:54 -04:00
parent f6b0b1bd03
commit dae0d44881
3 changed files with 6 additions and 4 deletions

View File

@ -51,8 +51,8 @@ connection-string=postgresql://postgres@localhost/todo.sr.ht
oauth-client-id=CHANGEME
oauth-client-secret=CHANGEME
#
# Value of From header in notification emails
notify-from=CHANGEME
# Outgoing email for notifications generated by users
notify-from=CHANGEME@example.org
[meta.sr.ht]
origin=http://meta.sr.ht.local

View File

@ -196,7 +196,8 @@ def ticket_comment_POST(owner, name, ticket_id):
tracker.owner.canonical_name(), tracker.name,
ticket.scoped_id, ticket.title),
headers={
"From": notify_from,
"From": "~{} <{}>".format(
current_user.username, notify_from),
"Sender": smtp_user,
},
ticket=ticket,

View File

@ -327,7 +327,8 @@ def tracker_submit_POST(owner, name):
tracker.owner.canonical_name(), tracker.name,
ticket.scoped_id, ticket.title),
headers={
"From": notify_from,
"From": "~{} <{}>".format(
current_user.username, notify_from),
"Sender": smtp_user,
}, ticket=ticket,
ticket_url=ticket_url.replace("%7E", "~")) # hack