Last active
November 30, 2021 17:08
-
-
Save CrimsonScythe/43bc79e6d77649307f1688850edad65b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify | |
from mailasync import sendMail | |
app = Flask(__name__) | |
@app.route('/api/send', methods=['GET', 'POST']) | |
def send(): | |
data = request.get_json() | |
sendMail.delay(data) | |
return jsonify({"response:": "ok"}) | |
if __name__ == '__main__': | |
app.run(debug=True, host='0.0.0.0', port=5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment