-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b3bfeb
commit 37f987b
Showing
6 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,9 @@ secrets: | |
sentry: | ||
dsn: dsn | ||
jsLoaderUrl: url | ||
mailer: | ||
primary: | ||
host: host | ||
port: 587 | ||
user: user | ||
password: password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from __future__ import annotations | ||
|
||
from configurations.values import SecretValue, Value | ||
|
||
from ._utils import BaseConfigurationProtocol | ||
|
||
|
||
class SmtpMailerConfigMixin(BaseConfigurationProtocol): | ||
MAILER_PRIMARY_BACKEND = Value(default="django.core.mail.backends.smtp.EmailBackend") | ||
MAILER_PRIMARY_TIMEOUT = Value(default=5) | ||
MAILER_PRIMARY_HOST = SecretValue() | ||
MAILER_PRIMARY_HOST_PORT = SecretValue() | ||
MAILER_PRIMARY_HOST_PASSWORD = SecretValue() | ||
MAILER_PRIMARY_HOST_USER = SecretValue() | ||
|
||
@property | ||
def EMAIL_BACKEND(self): | ||
return self.MAILER_PRIMARY_BACKEND | ||
|
||
@property | ||
def EMAIL_TIMEOUT(self): | ||
return self.MAILER_PRIMARY_TIMEOUT | ||
|
||
@property | ||
def EMAIL_HOST(self): | ||
return self.MAILER_PRIMARY_HOST | ||
|
||
@property | ||
def EMAIL_PORT(self): | ||
return self.MAILER_PRIMARY_HOST_PORT | ||
|
||
@property | ||
def EMAIL_HOST_USER(self): | ||
return self.MAILER_PRIMARY_HOST_USER | ||
|
||
@property | ||
def EMAIL_HOST_PASSWORD(self): | ||
return self.MAILER_PRIMARY_HOST_PASSWORD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters