Reputation: 5282
Hello I have the following configuration in the thunderbird:
And I set this configuration inside app with:
app.config["MAIL_SERVER"] = "smtp....."
app.config["MAIL_PORT"] = 587
app.config["MAIL_USERNAME"] = "info@...."
app.config["MAIL_PASSWORD"] = "pasword"
app.config["MAIL_USE_TLS"] = True
app.config["MAIL_USE_SSL"] = False
but when I try to send an email with
from flask_mail import Message, Mail
mail = Mail(app)
msg = Message(
"Hello", sender="info@....", recipients=["[email protected]"]
)
try:
mail.send(msg)
except Exception as e:
print("---------")
print(e)
I got the following error:
[Errno -2] Name or service not known
how can I solve it?
Thanks
Upvotes: 0
Views: 431