moree docs

This commit is contained in:
Nomi Nonsense (Nonszy) 2023-09-09 14:48:16 +07:00
parent 008f516cff
commit 2aab665545
2 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,9 @@ Leisure project. A REST API that sends a one-time authentication code (a.k.a OTP
Setup: Setup:
- Create a new `.env` file - Create a new `.env` file
- Add your `EMAIL_SENDER` and `EMAIL_PASSWORD` in your `.env` file - Add your `EMAIL_SENDER` and `EMAIL_PASSWORD` in your `.env` file
- Optional:
- By default I use gmail for email host, you can configure your `HOST` in the `.env` file.
- You can also add `PORT` in `.env`
- Create or use an API test app like Postman - Create or use an API test app like Postman
Usage: Usage:

View File

@ -74,7 +74,7 @@ def send_email():
# Everyone has a different email host service # Everyone has a different email host service
# By default we use gmail to test our emails # By default we use gmail to test our emails
mail_host = os.environ.get("HOST") if os.environ.get("HOST") is not None else "smtp.gmail.com" mail_host = os.environ.get("HOST") if os.environ.get("HOST") is not None else "smtp.gmail.com"
mail_port = 465 mail_port = os.environ.get("PORT") if os.environ.get("PORT") is not None else 465
if mail_sender is None or mail_password is None: if mail_sender is None or mail_password is None:
return jsonify({ return jsonify({