Permit SMTP to mail relay without authentication (#600)
This commit is contained in:
parent
2d140f2e97
commit
824f5b289c
|
@ -218,6 +218,9 @@ with the password ``my:password``, it would be represented as::
|
|||
|
||||
smtp://someone%40example.com:my%3Apassword@smtp.example.com:25/
|
||||
|
||||
The username and password can be omitted, with a URL in the form
|
||||
``smtp://host:port/``, if your mail server is a (properly firewalled!)
|
||||
unauthenticated relay.
|
||||
|
||||
SendGrid
|
||||
########
|
||||
|
|
|
@ -395,8 +395,10 @@ if SETUP.EMAIL_SERVER:
|
|||
elif parsed.scheme == "smtp":
|
||||
EMAIL_HOST = parsed.hostname
|
||||
EMAIL_PORT = parsed.port
|
||||
EMAIL_HOST_USER = urllib.parse.unquote(parsed.username)
|
||||
EMAIL_HOST_PASSWORD = urllib.parse.unquote(parsed.password)
|
||||
if parsed.username is not None:
|
||||
EMAIL_HOST_USER = urllib.parse.unquote(parsed.username)
|
||||
if parsed.password is not None:
|
||||
EMAIL_HOST_PASSWORD = urllib.parse.unquote(parsed.password)
|
||||
EMAIL_USE_TLS = as_bool(query.get("tls"))
|
||||
EMAIL_USE_SSL = as_bool(query.get("ssl"))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue