Skip to content
Advertisement

Django: Gmail SMTP error: please run connect() first

I am trying to send mail when a certain query is executed. But I am getting error in the connection. I have tried the following settings in my settings.py file

JavaScript

I have executed the following command to send the email:

JavaScript

But whenever I run the above code I get ‘please run connect() first’ error. What is the error Exactly about and how do I solve this?

Advertisement

Answer

Make sure you have all the email settings configured:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement