Example #1
0
def login_success(template, email, name, keys=None):
    """ Send Email because Login Success """

    msg = Message('Merci de votre inscription !', sender=sender_mail, recipients=[email])
    if keys:
        msg.html = r(template_mail + template, email=email, name=name, keys=str(keys))
    else:
        msg.html = r(template_mail + template)
    return send_message_to_user(msg)
Example #2
0
def payment_success(template, data, user_type, email):
    """ Send a email with command recap """

    msg = Message('Récaputilatif de commande !', sender=sender_mail, recipients=[email])
    html_context = r(template_mail + template, data=data, user_type=user_type)
    msg.html = html_context
    return send_message_with_attach(data['reference'], html_context, msg)
Example #3
0
def canceled_reservation_by_artist(template, data, reference, email, user_type="customer", user_connected=None):
    """ Send a email after artist accept reservation """

    msg = Message('Reservation Refuser !', sender=sender_mail, recipients=[email])
    html_context = r(template_mail + template, data=data, reference=reference, user_type=user_type)
    msg.html = html_context
    return send_message_with_attach(reference, html_context, msg, user_connected)
Example #4
0
def canceled_by_auditor_after_accept(template, data, reference, email, user_type="customer", user_connected=None):
    """ Send a email with refund details recap """

    msg = Message('Annulation de la reservation !', sender=sender_mail, recipients=[email])
    html_context = r(template_mail + template, data=data, reference=reference, user_type=user_type)
    msg.html = html_context
    return send_message_with_attach(reference, html_context, msg, user_connected)
Example #5
0
def send_prestige(
        template,
        reference,
        sender_name,
        sender_email,
        recipient_email,
        prestige,
        beat_title=None,
        service_title=None):
    """ this is function for send prestige """

    msg = Message('Prestige', sender=sender_mail, recipients=[recipient_email])
    msg.html = r(
        template_mail + template,
        prestige=prestige,
        sender_name=sender_name,
        sender_email=sender_email,
        service_title=service_title,
        beat_title=beat_title,
        reference=reference,
    )
    return send_message_to_user(msg)
Example #6
0
def page_not_found(error):
    return r('404.html'), 404
Example #7
0
def index():
    status = s.status_date()
    return r('index.html', spanCode=status)
Example #8
0
def password_updated(template, email, name):
    """ Password updated message """

    msg = Message('Changement de mot de passe avec succès', sender=sender_mail, recipients=[email])
    msg.html = r(template_mail + template, email=email, name=name)
    return send_message_to_user(msg)
Example #9
0
def reset_password(template, keys, email, name):
    """ Send Email because Password Reset """

    msg = Message('Demande de changement de mot de passe', sender=sender_mail, recipients=[email])
    msg.html = r(template_mail + template, keys=keys, name=name)
    return send_message_to_user(msg)
Example #10
0
def payment_refused(template, data, user_type, email):
    """ Send a email with command recap """

    msg = Message('Command réfusé !', sender=sender_mail, recipients=[email])
    msg.html = r(template_mail + template, data=data, user_type=user_type)
    return send_message_to_user(msg)
Example #11
0
def first_service(template, recipient_email, name, service_title):
    """ Send Email after first service """

    msg = Message('Félicitation !', sender=sender_mail, recipients=[recipient_email])
    msg.html = r(template_mail + template, name=name, service_title=service_title)
    return send_message_to_user(msg)
def index():
    return r('index.html')