i'm trying to send and email (from my personal hotmail account) from a Django API. When i make a request through Postman to the local server it works but when i host my app on Heroku it raise the following exception:
I've reading and Hotmail accounts have something like SMTP permissions:
Here is my Django config vars:
CORS_ALLOWED_ORIGINS = ['https://gianlop3z-dev.web.app']
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = 'smtp.office365.com'
EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD')
EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER')
django_heroku.settings(locals())
The environment variables are in Heroku.


Make sure your Outlook account settings change Under Pop options to Yes. (I believe you already done it as per your pics)
Check if your outlook account has been blocked by an unusual activity, in that case, you may need to verify your account (via the assigned mobile#) and verify and review your activities (email should looks like below)
In your settings.py change as below
finally make sure to import smtplib