added html email and made site deployment ready | security fixes still needed
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user