No Description

email.py 274B

123456789
  1. from flask_mail import Message
  2. from app import mail
  3. from app import app
  4. def send_email(subject, sender, recipients, text_body, html_body):
  5. msg = Message(subject, sender=sender, recipients=recipients)
  6. msg.body = text_body
  7. msg.html = html_body
  8. mail.send(msg)