Exemple #1
0
def email_test():
    form = EmailTest()

    if form.validate_on_submit():
        # send email notification
        mail = FlicketMail()
        mail.test_email([form.email_address.data])
        flash(Markup(gettext(
            'Flicket has tried to send an email to the address you entered. Please check your inbox. If no email has '
            'arrived please double check the <a href="{}{}">config</a> settings.'.format(
                app.config['base_url'], url_for('admin_bp.config')))), category='warning')

    return render_template('admin_email_test.html',
                           title='Send Email Test',
                           form=form)
def email_test():
    form = EmailTest()

    if form.validate_on_submit():
        # send email notification
        mail = FlicketMail()
        mail.test_email([form.email_address.data])
        flash(
            Markup(
                gettext(
                    f"Flicket has tried to send an email to the address you entered. Please check your inbox. If no email has "
                    f'arrived please double check the <a href="{app.config["base_url"]}{url_for("admin_bp.config")}">config</a>'
                    f" settings.")),
            category="warning",
        )

    return render_template("admin_email_test.html",
                           title="Send Email Test",
                           form=form)