from flask_mail import Mail
...
# email server
MAIL_SERVER = 'your.mailserver.com'
MAIL_PORT = 25
MAIL_USE_TLS = False
MAIL_USE_SSL = False
MAIL_USERNAME = 'sender1.mailserver.com'
MAIL_PASSWORD = 'sender1-password'
app.config.update(
MAIL_SERVER = 'two.yandex.com'
MAIL_USERNAME = 'user'
)