diff --git a/.gitignore b/.gitignore index e0f73b0..d8b54ef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ __pycache__/ venv/ *.venv .env +*env .idea diff --git a/Mail/app.py b/Mail/app.py new file mode 100644 index 0000000..62818f5 --- /dev/null +++ b/Mail/app.py @@ -0,0 +1,16 @@ +from config import app, mail +from flask_mail import Mail, Message + +@app.route("/send_mail") +def index(): + mail_message = Message('Hi ! Don’t forget to follow me for more article!', + sender='celestino_rey@ymail.com', + recipients = ['celestino.rey@gmail.com']) + + mail_message.body = "This is a test" + mail.send(mail_message) + + return "hola mundo. Mensaje enviado" + +if __name__ == '__main__': + app.run(debug = True) \ No newline at end of file