r/FastAPI • u/killer-cherry-tomato • Mar 14 '23
Question Need help with authentication
This is about the libroary FastAPI-mail.
Ok, I wrote a little project to send emails from my gmail account, created the password for google "less secure apps" and it all worked.
Then I had the great idea of formatting my computer and I didn't rememer the the .env file wasn't on my repo. Now I have created a new file and added what should be the exact same variables and values and when I try to send a mail, the process keeps on running and some time later I get:
"fastapi_mail.errors.ConnectionErrors: Exception raised Timed out connecting to smtp.gmail.com on port 587, check your credentials or email service configuration", but I can't find the cause.
my .env file is:MAIL_USERNAME=[email protected]MAIL_PASSWORD=lessSecureAppPassMAIL_FROM=[email protected]MAIL_PORT=587MAIL_SERVER=smtp.gmail.comMAIL_FROM_NAME=somename
0
u/[deleted] Mar 19 '23
[deleted]