Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Send email with Flask

Hello everyone, does anyone know why I can only send emails to my email, which is where the app was created? When I try to send a message to another email, I don't get any error, but the email doesn't arrive. You can see the code in the pictures.

project.config'MAIL_SERVER' = 'smtp.gmail.com'
project.config'MAIL_PORT' = 465
project.config'MAIL_USERNAME' = 'my email'
project.config'MAIL_PASSWORD' = 'app password'
project.config'MAIL_USE_SSL' = True
project.config'MAIL_USE_TLS' = False

Or here:


def renderregistration():
message = ''
if flask.request.method == "POST":
email
form = flask.request.form"email"
numberform = flask.request.form["phonenumber"]
nameform = flask.request.form["name"]
surname
form = flask.request.form"surname"
mentorform = flask.request.form["mentor"]
#User.query.filterby(email =

/r/flask
https://redd.it/1kc4wv1
What could I have done better here?

Hi, I'm pretty new to Python, and actual scripting in general, and I just wanted to ask if I could have done anything better here. Any critiques?

import time
import colorama
from colorama import Fore, Style

color = 'WHITE'
colorvar2 = 'WHITE'

#Reset colors
print(Style.RESETALL)

#Get current directory (for debugging)
#print(os.getcwd())

#Startup message
print("Welcome to the ASCII art reader. Please set the path to your ASCII art below.")

#Bold text
print(Style.BRIGHT)

#User-defined file path
path = input(
Fore.BLUE + 'Please input the file path to your ASCII art: ')
color = input('Please input your desired color (default: white): ' + Style.RESET
ALL)

#If no ASCII art path specified
if not path:
print(Fore.RED +

/r/Python
https://redd.it/1p4ffmh