Fix SMTP email From header and remove 'Admin' from the From header (#1229)

* Fix SMTP email From header and remove 'Admin' from the From header
This commit is contained in:
Kevin Chung
2020-02-11 21:35:58 -05:00
committed by GitHub
parent 309e62520e
commit 1049a14b90
4 changed files with 20 additions and 3 deletions

View File

@@ -355,7 +355,10 @@ def test_user_can_reset_password(mock_smtp):
# Issue the password reset request
client.post("/reset_password", data=data)
ctf_name = get_config("ctf_name")
from_addr = get_config("mailfrom_addr") or app.config.get("MAILFROM_ADDR")
from_addr = "{} <{}>".format(ctf_name, from_addr)
to_addr = "user@user.com"
# Build the email