The objective of my website is to send email and it doesn’t work. I don’t really understand why, and I have already bought a paying account.
from flask_mail import Mail, Message
app.config["MAIL_SERVER"] = 'stmp.gmail.com'
app.config["MAIL_USE_TLS"] = True
app.config["MAIL_USE_SSL"] = False
app.config["MAIL_USERNAME"] = 'me'
app.config["MAIL_PASSWORD"] = ‘mypassword’
app.config["MAIL_DEBUG"] = True
app.config["MAIL_SUPPRESS_SEND"] = False
app.config["MAIL_PORT"] = 587
app.config["MAIL_DEFAULT_SENDER"] = ('me', ‘myadress@gmail.com')
app.config["MAIL_MAX_EMAILS"] = None
app.config["MAIL_ASCII_ATTACHMENTS"] = False
mail = Mail(app)
@app.route('/ontest')
def ontest():
msg = Message("yo", recipients = ["…@....fr"])
msg.body = "hi"
mail.send(msg)
return "Message sent!"
Then I get : Internal Server Error
Is there somebody who can help me? Thanks a lot!