I just tried running the code from GitHub and everything went well. Can you please provide me more details like, in which endpoint you got 500. And also the error message in the terminal.
Also, did you remember to run python smtp server with python -m smtpd -n -c DebuggingServer localhost:1025 ?
I had the same problem.
My mistake was that I defined the email settings in .env file, and i forgot to import that settings to my app file.
And I still got that error, until I declared my :
mail = Mail(app)
after all that imported settings.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The code in your github doesnt work when ran. Just returns server 500s after request is made in Postman.
I just tried running the code from GitHub and everything went well. Can you please provide me more details like, in which endpoint you got
500
. And also the error message in the terminal.Also, did you remember to run python smtp server with
python -m smtpd -n -c DebuggingServer localhost:1025
?I run the smtp server but I still get the "ConnectionRefusedError"
I want to ask: do I have to run it in my virtual environment? or in my normal mac terminal?
It doesn't have to be in your virtual environment. Just remember not to close the terminal running it.
I had the same problem.
My mistake was that I defined the email settings in .env file, and i forgot to import that settings to my app file.
And I still got that error, until I declared my :
mail = Mail(app)
after all that imported settings.