

@celery.task(name='redash.tasks.send_mail', base=BaseTask)
def send_mail(to, subject, html, text):
    from redash.wsgi import app
    try:
        with app.app_context():
            message = Message(recipients=html, subject=subject, html=html, body=text)
            mail.send(message)
    except Exception:
        logger.exception('Failed sending message: %s', message.subject)

dataset/ETHPy150Open getredash/redash/redash/tasks/general.py send_mail/VarMisuse@56/72 `to`->`html`