code: def get_available_backends():
      
      backends = get_config().get('BACKENDS', {})
  
      if backends:
          return backends
  
      # Try to get backend settings from old style
      # POST_OFFICE = {
      #     'EMAIL_BACKEND': 'mybackend'
      # }
      backend = get_config().get('EMAIL_BACKEND')
      if backend:
          warnings.warn('Please use the new POST_OFFICE["BACKENDS"] settings',
                        DeprecationWarning)
  
          backends['default'] = backend
          return backends
  
      # Fall back to Django's EMAIL_BACKEND definition
      backends['default'] = getattr(
          settings, 'EMAIL_BACKEND',
          'django.core.mail.backends.smtp.EmailBackend')
  
      # If EMAIL_BACKEND is set to use PostOfficeBackend
      # and POST_OFFICE_BACKEND is not set, fall back to SMTP
      if 'post_office.EmailBackend' in backends['default']:
          backends['default'] = 'django.core.mail.backends.smtp.EmailBackend'
  
      return backends
docs: Returns a dictionary of defined backend classes. For example:
      {
          'default': 'django.core.mail.backends.smtp.EmailBackend',
          'locmem': 'django.core.mail.backends.locmem.EmailBackend',
      }