From c87903ca4d01382623fb1ac3ce076456c279b841 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Tue, 30 May 2023 19:02:34 +0200 Subject: verification: use right mail text and subject --- fietsboek/views/default.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fietsboek/views/default.py b/fietsboek/views/default.py index 397f9ca..b3cad40 100644 --- a/fietsboek/views/default.py +++ b/fietsboek/views/default.py @@ -220,7 +220,8 @@ def do_resend_verification(request: Request) -> Response: query = models.User.query_by_email(request.params["email"]) user = request.dbsession.execute(query).scalar_one_or_none() if user is None or user.is_verified: - request.session.flash(request.localizer.translate(_("flash.resend_verification_email"))) + request.session.flash( + request.localizer.translate(_("flash.resend_verification_email_fail"))) return HTTPFound(request.route_url("resend-verification")) token = models.Token.generate(user, TokenType.VERIFY_EMAIL) @@ -230,10 +231,10 @@ def do_resend_verification(request: Request) -> Response: mail = email.prepare_message( request.config.email_from, user.email, - request.localizer.translate(_("page.password_reset.email.subject")), + request.localizer.translate(_("email.verify_mail.subject")), ) mail.set_content( - request.localizer.translate(_("page.password_reset.email.body")).format( + request.localizer.translate(_("email.verify.text")).format( request.route_url("use-token", uuid=token.uuid) ) ) @@ -244,7 +245,7 @@ def do_resend_verification(request: Request) -> Response: mail, ) - return HTTPFound(request.route_url("password-reset")) + return HTTPFound(request.route_url("login")) @view_config(route_name="use-token") -- cgit v1.2.3