mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-09 23:51:20 +00:00
@@ -115,6 +115,10 @@ if os.getenv("EMAIL_HOST"):
|
||||
# True, we use that.
|
||||
EMAIL_USE_SSL = os.getenv("EMAIL_USE_SSL", "False").lower() in ("true", "1", "yes")
|
||||
EMAIL_USE_TLS = os.getenv("EMAIL_USE_TLS", str(not EMAIL_USE_SSL)).lower() in ("true", "1", "yes")
|
||||
|
||||
if os.getenv("EMAIL_LOGGING", "false").lower() in ("true", "1", "yes"):
|
||||
LOGGING['loggers']['bugsink.email']['level'] = "INFO"
|
||||
|
||||
else:
|
||||
# print("WARNING: EMAIL_HOST not set; email will not be sent")
|
||||
EMAIL_BACKEND = "bugsink.email_backends.QuietConsoleEmailBackend"
|
||||
|
||||
@@ -71,6 +71,10 @@ EMAIL_BACKEND = "bugsink.email_backends.QuietConsoleEmailBackend" # instead of
|
||||
# EMAIL_USE_TLS = ...
|
||||
# EMAIL_USE_SSL = ...
|
||||
|
||||
# Uncomment the line below to show all sent emails in the logs
|
||||
# LOGGING['loggers']['bugsink.email']['level'] = "INFO"
|
||||
|
||||
|
||||
SERVER_EMAIL = DEFAULT_FROM_EMAIL = "Bugsink <bugsink@example.org>"
|
||||
|
||||
# constants for "create by" (user/team/project) settings
|
||||
|
||||
@@ -356,6 +356,13 @@ LOGGING['loggers']['bugsink.performance'] = {
|
||||
"propagate": False,
|
||||
}
|
||||
|
||||
# Email logging is hidden below WARNING by default, but this can be changed by setting the level to INFO.
|
||||
LOGGING['loggers']['bugsink.email'] = {
|
||||
"level": "WARNING",
|
||||
"handlers": ["console"],
|
||||
"propagate": False,
|
||||
}
|
||||
|
||||
# Snappea Logging
|
||||
LOGGING["formatters"]["snappea"] = {
|
||||
"format": "{threadName} - {levelname:7} - {message}",
|
||||
|
||||
@@ -30,6 +30,8 @@ def send_rendered_email(subject, base_template_name, recipient_list, context=Non
|
||||
)
|
||||
return
|
||||
|
||||
logger.info("Sending email with subject '%s' to %s", subject, recipient_list)
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user