Improve From: in emails from todo.sr.ht
This commit is contained in:
parent
f6b0b1bd03
commit
dae0d44881
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue