mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 00:30:59 +00:00
Permit SMTP to mail relay without authentication (#600)
This commit is contained in:
parent
2d140f2e97
commit
824f5b289c
2 changed files with 7 additions and 2 deletions
|
@ -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 a new issue