Initial work on mail sending

This commit is contained in:
Thastertyn committed 2024-03-10 21:41:48 +01:00
1 parent bc0dae4f97
commit 2eae36e8fd
4 files changed
+31 -1

No files matched your search

+7
View File
@@ -9,6 +9,8 @@ from flask_jwt_extended import create_access_token
from app.extensions import db_cursor, db_connection
from app.extensions import jwt_redis_blocklist
from app.mail_utils import send_mail
class UserService:
"""
@@ -59,6 +61,11 @@ class UserService:
print(f"Error: {e}")
return {"Failed": "Failed to insert into database. Username or email are likely in use already"}, 500
# TODO Implement mail sending
# Currently throws error - connection refused
# send_mail("Successfully registered!", email, "Congratulations! Your account has been successfully created.\nThis mail also serves as a test that the email address is correct")
return {"Success": "User created successfully"}, 200
@staticmethod