from flask import render_template, current_app
from flask_mail import Message
from application import mail

def send_email(subject, sender, recipients, text_body, html_body):
    msg= Message(subject, sender=sender, recipients=recipients)
    msg.body= text_body
    msg.html= html_body
    mail.send(msg)
