- #1
rgtr
- 92
- 8
- TL;DR Summary
- In python flask I am trying to setup the smtp for emails in outlook and it is not working. It was working with google.
I am trying setting up flask email for outlook. I had it working with gmail I found this link https://superuser.com/questions/1521236/how-to-allow-less-secure-app-access-in-microsoft-email I tried
Python:
MAIL_SERVER= 'smtp.office365.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USE_SSL = False
MAIL_USERNAME = os.environ['EMAIL_USERNAME']
MAIL_PASSWORD = os.environ['EMAIL_PASSWORD'] # and I tried MAIL_SERVER= 'outlook.office365.com'
MAIL_PORT = 995
MAIL_USE_TLS = True
MAIL_USE_SSL = False
MAIL_USERNAME = os.environ['EMAIL_USERNAME']
MAIL_PASSWORD = os.environ['EMAIL_PASSWORD']