university-final-iot-backend/app/accounts/email.py

11 lines
200 B
Python

from flask_mail import Message
def send_email(mailmanager, to, subject, template):
msg = Message(
subject,
recipients=[to],
html=template
)
mailmanager.send(msg)