added html email and made site deployment ready | security fixes still needed

This commit is contained in:
2026-01-09 03:33:15 +01:00
parent 8a3857a093
commit 10fd6e63bf
6 changed files with 183 additions and 10 deletions

View File

@@ -13,10 +13,11 @@ def send_verification_email(user_email):
s = URLSafeTimedSerializer(current_app.config['SECRET_KEY'])
token = s.dumps(user_email, salt='email-confirm-h4tum-ctf-2025')
link = url_for('main.verify_email', token=token, _external=True)
logo = url_for('static', filename='h4tum_white.png', _external=True)
#msg = Message('Verify your CTF Registration', recipients=["fdohq9ipugtc@mockmail.io"])
#msg.body = f'Click here to confirm your spot: {link}\nThanks for registering {user_email}'
print(link)
msg = Message('Verify your CTF Registration', recipients=[user_email])
msg.html = render_template("email.html", user_email=user_email, link=link, logo_url=logo)
mail.send(msg)
@bp.route('/', methods=['GET', 'POST'])
def index():