from flask.ext.mail import Message from app import mail, app CONFIRM_MESSAGE = """ This email address was recently used to register the username '%s' at Quay.

To confirm this email address, please click the following link:
https://quay.io/confirm?code=%s """ def send_confirmation_email(username, email, token): msg = Message('Welcome to Quay! Please confirm your email.', sender='support@quay.io', # Why do I need this? recipients=[email]) msg.html = CONFIRM_MESSAGE % (username, token, token) mail.send(msg)