As far as I can tell, there is nothing wrong with this configuration. The only problem is that your application does not use it. Before initializing Mail you must update the configuration:
app = Flask(__name__) app.config.update(dict( DEBUG = True, MAIL_SERVER = 'smtp.gmail.com', MAIL_PORT = 587, MAIL_USE_TLS = True, MAIL_USE_SSL = False, MAIL_USERNAME = 'my_username@gmail.com', MAIL_PASSWORD = 'my_password', )) mail = Mail(app)
zero323
source share