hi i can send an email alright with a custom route like the following:
@app.route("/send")
def index():
msg = Message('Hello', sender = 'support@example.com', recipients = ['recipientemail@gmail.com'])
msg.body = "Hello Flask message sent from Flask-Mail"
mail.send(msg)
return "Sent"
the problem i am facing is when i use flask-security-too and goto the /confirm route it wont use my configuration for example:
app.config['MAIL_SERVER']='mail.privateemail.com'
app.config['MAIL_PORT'] = 465
app.config['MAIL_USERNAME'] = 'support@example'
app.config['MAIL_PASSWORD'] = '***************'
app.config['MAIL_USE_TLS'] = False
app.config['MAIL_USE_SSL'] = True
mail = Mail(app)
but the route /send will how do i set global setting or what exactly is going on here.