The idea was pursued in https://code.djangoproject.com/ticket/22734 but ultimately abandoned. On Saturday, January 29, 2022 at 6:01:30 PM UTC-5 jacob...@gmail.com wrote:
> This proposal attempts to address the following issues: > https://code.djangoproject.com/ticket/6989 (14 years old) > https://github.com/django/django/pull/13728 > and > https://code.djangoproject.com/ticket/31885 > https://github.com/django/django/pull/13305 > > Currently all the parameters to configure the email backend are located > in the global namespace, typically starting with EMAIL_... > This in the past led to discussions whenever a new configuration parameter > was required, because it added another entry to the yet too long list of > configuration > settings. > > Since Django allows us to use more than one email backend concurrently, > why don't we configure them in a similar way as we already do it with > database, caching or template engine backends? > > Such a configuration setting then may look like: > > EMAIL = [ > { > 'BACKEND': 'django.core.mail.backends.smtp.EmailBackend', > 'HOST': 'smtp.example.org', > 'HOST_USER': 'smtp_user', > 'HOST_PASSWORD': 'smtp_secret', > 'PORT': 25, > 'FQDN': 'example.org', > # all other related directives > } > ] > > This would allow each email backend to "bring" its own configuration > settings > contained in their own dictionary. Adding extra settings to this dict will > certainly > lead to less discussions as we currently have. > > Personally, I would prefer SMTP = {...} as the main configuration > directive, but EMAIL seems to be more popular in Django. > > This would mean that the configuration directives starting from here > <https://docs.djangoproject.com/en/4.0/ref/settings/#email-backend> will > have > to be replaced, by their counterparts as explained before. > > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f124b879-4913-42ab-a635-ed3c570e7a83n%40googlegroups.com.