enable setting SERVER_EMAIL from env, use DEFAULT_FROM_EMAIL for send_mail

From documentation for DEFAULT_FROM_EMAIL:

Default email address to use for various automated correspondence from the site manager(s).
This doesn’t include error messages sent to ADMINS and MANAGERS; for that, see SERVER_EMAIL.

That means it makes sense to make SERVER_EMAIL and DEFAULT_FROM_EMAIL separate settings and
not set one from another.
This commit is contained in:
clime
2019-02-10 19:36:43 +01:00
parent 4f06ccbb7b
commit 3fda33b6f6
2 changed files with 3 additions and 4 deletions

View File

@@ -57,8 +57,6 @@ BASE_URL = os.environ.get('BASE_URL', 'http://avatars.linux-kernel.at/avatar/')
LOGIN_REDIRECT_URL = reverse_lazy('profile')
MAX_LENGTH_EMAIL = 254 # http://stackoverflow.com/questions/386294
SERVER_EMAIL = 'accounts@mg.linux-kernel.at'
DEFAULT_FROM_EMAIL = SERVER_EMAIL
MAX_NUM_PHOTOS = 5
MAX_NUM_UNCONFIRMED_EMAILS = 5
@@ -108,6 +106,7 @@ else:
}
EMAIL_BACKEND = 'anymail.backends.mailgun.EmailBackend' # pragma: no cover
SERVER_EMAIL = os.environ.get('SERVER_EMAIL', 'ivatar@mg.linux-kernel.at')
DEFAULT_FROM_EMAIL = os.environ.get('DEFAULT_FROM_EMAIL', 'ivatar@mg.linux-kernel.at')
try: