Exemplo n.º 1
0
def send_password_reset_email(user):
    token = user.get_reset_password_token()
    send_email('xTDS WebPortal Password Reset',
               recipients=[user.email],
               text_body=render_template('email/reset_password.txt',
                                         user=user,
                                         token=token),
               html_body=render_template('email/reset_password.html',
                                         user=user,
                                         token=token))
Exemplo n.º 2
0
def send_treasurer_activation_email(email, username, password, message):
    send_email('xTDS WebPortal account activation',
               recipients=[email],
               text_body=render_template('email/activate_treasurer.txt',
                                         username=username,
                                         password=password,
                                         message=message),
               html_body=render_template('email/activate_treasurer.html',
                                         username=username,
                                         password=password,
                                         message=message),
               bcc=current_app.config['ADMINS'])
Exemplo n.º 3
0
def send_dancer_user_account_email(dancer, full_name, dancer_password):
    send_email(
        f"Complete your registration for the {g.sc.year} {g.sc.tournament} in {g.sc.city}",
        recipients=[dancer.email],
        text_body=render_template('email/activate_dancer_user_account.txt',
                                  dancer=dancer,
                                  name=full_name,
                                  password=dancer_password),
        html_body=render_template('email/activate_dancer_user_account.html',
                                  dancer=dancer,
                                  name=full_name,
                                  password=dancer_password))
Exemplo n.º 4
0
def send_gdpr_reminder_email(dancer):
    send_email(f"{g.sc.year} {g.sc.tournament} in {g.sc.city} - GDPR reminder",
               recipients=[dancer.email],
               text_body=render_template('email/dancer_gdpr_reminder.txt',
                                         tournament=g.sc.tournament,
                                         year=g.sc.year,
                                         city=g.sc.city,
                                         dancer=dancer),
               html_body=render_template('email/dancer_gdpr_reminder.html',
                                         tournament=g.sc.tournament,
                                         year=g.sc.year,
                                         city=g.sc.city,
                                         dancer=dancer))
Exemplo n.º 5
0
def send_registration_open_email(email):
    send_email(
        f"{g.sc.year} {g.sc.tournament} in {g.sc.city} - Registration open",
        recipients=[email],
        text_body=render_template('email/registration_open.txt',
                                  tournament=g.sc.tournament,
                                  year=g.sc.year,
                                  city=g.sc.city),
        html_body=render_template('email/registration_open.html',
                                  tournament=g.sc.tournament,
                                  year=g.sc.year,
                                  city=g.sc.city),
        bcc=current_app.config['ADMINS'])
Exemplo n.º 6
0
def send_super_volunteer_user_account_email(super_volunteer, full_name,
                                            super_volunteer_password):
    send_email(f"Registered for {g.sc.year} {g.sc.tournament} in {g.sc.city}",
               recipients=[super_volunteer.email],
               text_body=render_template(
                   'email/activate_super_volunteer_user_account.txt',
                   super_volunteer=super_volunteer,
                   name=full_name,
                   password=super_volunteer_password),
               html_body=render_template(
                   'email/activate_super_volunteer_user_account.html',
                   super_volunteer=super_volunteer,
                   name=full_name,
                   password=super_volunteer_password))
Exemplo n.º 7
0
def send_organizer_activation_email(email, username, password, tournament,
                                    year, city):
    send_email('xTDS WebPortal account activation',
               recipients=[email],
               text_body=render_template('email/reset_organizer.txt',
                                         username=username,
                                         password=password,
                                         tournament=tournament,
                                         year=year,
                                         city=city),
               html_body=render_template('email/reset_organizer.html',
                                         username=username,
                                         password=password,
                                         tournament=tournament,
                                         year=year,
                                         city=city),
               bcc=current_app.config['ADMINS'])
Exemplo n.º 8
0
def send_error_email(code, msg):
    send_email('xTDS WebPortal error: {}'.format(code),
               recipients=current_app.config['ADMINS'],
               text_body=render_template('email/error.txt', message=msg),
               html_body=render_template('email/error.html', message=msg))
Exemplo n.º 9
0
def send_raffle_completed_email(teamcaptain_email):
    send_email(f"{g.sc.tournament} raffle completed",
               recipients=[teamcaptain_email],
               text_body=render_template('email/raffle_completed.txt'),
               html_body=render_template('email/raffle_completed.html'))