From 68ac7c293abd9aabb953c9dd6a9ed6e65c9630dc Mon Sep 17 00:00:00 2001 From: Place Jean-Marie Date: Sat, 30 Oct 2021 12:09:35 +0200 Subject: [PATCH] mail from current user rather than admin --- app/views/users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/users.py b/app/views/users.py index 53f60030..fed26e52 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -153,6 +153,7 @@ def create_user_form(user_name=None, edit=0, all_roles=1): "form. création ou edition utilisateur" auth_dept = current_user.dept auth_username = current_user.user_name + from_mail = current_user.email initvalues = {} edit = int(edit) all_roles = int(all_roles) @@ -583,7 +584,7 @@ def create_user_form(user_name=None, edit=0, all_roles=1): token = None send_email( "[ScoDoc] Création de votre compte", - sender=current_app.config["ADMINS"][0], + sender=from_mail, # current_app.config["ADMINS"][0], recipients=[u.email], text_body=render_template("email/welcome.txt", user=u, token=token), html_body=render_template(