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":
emailform = flask.request.form"email"
numberform = flask.request.form["phonenumber"]
nameform = flask.request.form["name"]
surnameform = flask.request.form"surname"
mentorform = flask.request.form["mentor"]
#User.query.filterby(email =
/r/flask
https://redd.it/1kc4wv1
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":
emailform = flask.request.form"email"
numberform = flask.request.form["phonenumber"]
nameform = flask.request.form["name"]
surnameform = flask.request.form"surname"
mentorform = flask.request.form["mentor"]
#User.query.filterby(email =
/r/flask
https://redd.it/1kc4wv1
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
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.RESETALL)
#If no ASCII art path specified
if not path:
print(Fore.RED +
/r/Python
https://redd.it/1p4ffmh
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.RESETALL)
#If no ASCII art path specified
if not path:
print(Fore.RED +
/r/Python
https://redd.it/1p4ffmh
Reddit
From the Python community on Reddit
Explore this post and more from the Python community