Mail sends forever Flask-mail

31 Views Asked by At

Mail sends forever. There are nothing at logs (request also not prints). Flask-mail settings:

MAIL_SERVER = 'smtp.yandex.com'
MAIL_PORT = 465
MAIL_USE_TLS = True
MAIL_USERNAME = '******************@yandex.ru'
MAIL_PASSWORD = '******************'
MAIL_DEFAULT_SENDER = '******************@yandex.ru'

Main.py

...

mail = Mail(app)
self_email = config.MAIL_USERNAME

...

def recovery():
    ...
    msg = Message(
        'Password reset',
        recipients=[email, ]
    )
    msg.html = '<b>Testing</b>'
    mail.send(msg) # Sends forever

How to fix it?

0

There are 0 best solutions below