[rewrite] Initial project structure with dashboard frontend and api
This commit is contained in:
1 parent
c018d2fb52
commit
40aa0295b1
70 files changed
+19923
-214
No files matched your search
@@ -0,0 +1,17 @@
|
||||
from flask_mail import Message
|
||||
|
||||
from app import flask_mail
|
||||
|
||||
from app.mail.message_content import MessageContent
|
||||
|
||||
|
||||
def send_mail(message: MessageContent, recipient: str):
|
||||
|
||||
msg = Message(subject=message.subject, recipients=[recipient], body=message.body)
|
||||
|
||||
try:
|
||||
flask_mail.send(msg)
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"Failed to send email. Error: {e}")
|
||||
return False
|
||||
@@ -0,0 +1,4 @@
|
||||
class MessageContent:
|
||||
def __init__(self, subject, body):
|
||||
self.subject = subject
|
||||
self.body = body
|
||||
Reference in new issue
Block a user