mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-11-14 03:35:48 +00:00
8 lines
245 B
Python
8 lines
245 B
Python
|
from flask import current_app
|
||
|
from flask_mail import Mail, Message
|
||
|
|
||
|
def send(subject, sender, recipients, body):
|
||
|
mail = Mail(current_app)
|
||
|
msg = Message(subject, sender=sender, recipients=recipients)
|
||
|
msg.body = body
|
||
|
mail.send(msg)
|