feat: Add rss endpoints
All checks were successful
Build Docker / BuildImage (push) Successful in 1m42s

This commit is contained in:
2024-11-12 14:08:30 +11:00
parent 42aff1f455
commit 637562f920
2 changed files with 16 additions and 3 deletions

14
mail.py
View File

@@ -7,6 +7,20 @@ from flask import jsonify
import os
# This is used to send emails via API
# The process should be something like this
# curl --request POST \
# --url https://nathan.c.woodburn.au/api/email \
# --header 'Content-Type: application/json' \
# --data '{
# "key":"api-key",
# "to": "recipient@nathan.woodburn.au",
# "from": "sender@nathan.woodburn.au",
# "sender":"Nathan.Woodburn/",
# "subject":"Test email from api",
# "body":"G'\''day\nThis is a test email from my website api\n\nRegards,\nNathan.Woodburn/"
# }'
def validateSender(email):
domains = os.getenv("EMAIL_DOMAINS").split(",")
for domain in domains: