Coverage for conf/settings/email.py: 87%
13 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 06:14 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 06:14 +0000
1from decouple import config
4# The contact email of the Openverse team
5CONTACT_EMAIL = config("CONTACT_EMAIL", default="openverse@wordpress.org")
7EMAIL_SENDER = config("EMAIL_SENDER", default="")
8EMAIL_HOST = config("EMAIL_HOST", default="")
9EMAIL_PORT = config("EMAIL_PORT", default=587, cast=int)
10EMAIL_HOST_USER = config("EMAIL_HOST_USER", default="")
11EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD", default="")
12EMAIL_SUBJECT_PREFIX = "[noreply]"
13EMAIL_USE_TLS = True
14DEFAULT_FROM_EMAIL = config("DEFAULT_FROM_EMAIL", default="")
16if EMAIL_HOST_USER or EMAIL_HOST_PASSWORD: 16 ↛ 17line 16 didn't jump to line 17 because the condition on line 16 was never true
17 EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
18else:
19 EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"