Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.config["DEBUG"] = True
- app.config["TESTING"] = False
- app.config["MAIL_SERVER"] = 'smtp.gmail.com'
- app.config["MAIL_PORT"] = 587
- app.config["MAIL_USE_SSL"] = False
- app.config["MAIL_USE_TLS"] = True
- app.config["MAIL_USERNAME"] = 'mattpythonapp@gmail.com'
- app.config["MAIL_PASSWORD"] = 'password'
- app.config["MAIL_DEFAULT_SENDER"] = 'mattpythonapp@gmail.com'
- app.config["SECURITY_EMAIL_SENDER"] = 'mattpythonapp@gmail.com'
- mail.init_app(app)
- @app.route('/contact', methods=['GET', 'POST'])
- def contact2():
- msg = Message('Hey There', recipients=['mattpythonapp@yahoo.com'])
- mail.send(msg)
Add Comment
Please, Sign In to add comment