dev_settings: Add EMAIL_PORT setting in zproject/dev_settings.py.

This commit adds EMAIL_PORT setting for explicitly specifying the
port of SMTP provider in dev_settings.py.

We also change email_backends.send_email_smtp to pass EMAIL_PORT
along with EMAIL_HOST to smtplib.SMTP.

After this change, we will not need to include the port along with
host in EMAIL_HOST.

Also updated the email.md docs accordingly for this change.
This commit is contained in:
sahil839
2020-08-04 17:12:12 +05:30
committed by Tim Abbott
parent 8108acbdfd
commit ead18b70fd
3 changed files with 4 additions and 2 deletions

View File

@@ -89,6 +89,7 @@ PASSWORD_MIN_GUESSES = 0
# SMTP settings for forwarding emails sent in development
# environment to an email account.
EMAIL_HOST = ""
EMAIL_PORT = 25
EMAIL_HOST_USER = ""
# Two factor authentication: Use the fake backend for development.