moree docs
This commit is contained in:
parent
008f516cff
commit
2aab665545
@ -7,6 +7,9 @@ Leisure project. A REST API that sends a one-time authentication code (a.k.a OTP
|
||||
Setup:
|
||||
- Create a new `.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
|
||||
|
||||
Usage:
|
||||
|
2
main.py
2
main.py
@ -74,7 +74,7 @@ def send_email():
|
||||
# Everyone has a different email host service
|
||||
# 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_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:
|
||||
return jsonify({
|
||||
|
Loading…
x
Reference in New Issue
Block a user