mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-20 06:58:02 +00:00
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:
@@ -31,7 +31,7 @@ from libravatar import libravatar_url
|
||||
from ivatar.settings import MAX_LENGTH_EMAIL, logger
|
||||
from ivatar.settings import MAX_PIXELS, AVATAR_MAX_SIZE, JPEG_QUALITY
|
||||
from ivatar.settings import MAX_LENGTH_URL
|
||||
from ivatar.settings import SECURE_BASE_URL, SITE_NAME, SERVER_EMAIL
|
||||
from ivatar.settings import SECURE_BASE_URL, SITE_NAME, DEFAULT_FROM_EMAIL
|
||||
from .gravatar import get_photo as get_gravatar_photo
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ class UnconfirmedEmail(BaseAccountModel):
|
||||
# if settings.DEBUG:
|
||||
# print('DEBUG: %s' % link)
|
||||
send_mail(
|
||||
email_subject, email_body, SERVER_EMAIL,
|
||||
email_subject, email_body, DEFAULT_FROM_EMAIL,
|
||||
[self.email])
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user