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)