Ask coding questions

← Back to all posts
[ERROR] Flask Application - SMTP - Please help
DillonB07 (61)


I'm working on a Flask application, and I get the following error when trying to launch it. Please can someone help me understand it? From what I understand, I need to use the connect() so I added it into my code, but it still doesn't work. I've included the error message and relevant code below.


I'm using macOS Catalina 10.15.7 with Python 3.9.1 and Pip 21.2.4

Edit: This code was tested on Replit and worked without the self.server.connect(). The issue is when I was moving it to my project which is local.


Saml2020 (86)

Are you trying to send from an protected email adress? Like gmail? You might need to allow insecure apps.

DillonB07 (61)

@Saml2020 No, I'm using Yandex, because I have a custom domain. However, if it was a system like Gmail, it wouldn't work on Replit, but would on my computer because I'm signed into that account on my computer.