docs: def parse(url):
      """Parses an email URL."""
  
      conf = {}
  
      url = urlparse.urlparse(url)
      qs = urlparse.parse_qs(url.query)
  
      # Remove query strings
      path = url.path[1:]
      path = path.split('?', 2)[0]
  
      # Update with environment configuration
      conf.update({
          'EMAIL_FILE_PATH': path,
          'EMAIL_HOST_USER': unquote(url.username),
          'EMAIL_HOST_PASSWORD': unquote(url.password),
          'EMAIL_HOST': url.hostname,
          'EMAIL_PORT': url.port,
          'EMAIL_USE_SSL': False,
          'EMAIL_USE_TLS': False,
      })
  
      if url.scheme in SCHEMES:
          conf['EMAIL_BACKEND'] = SCHEMES[url.scheme]
  
      # Set defaults for `smtp`
      if url.scheme == 'smtp':
          if not conf['EMAIL_HOST']:
              conf['EMAIL_HOST'] = 'localhost'
          if not conf['EMAIL_PORT']:
              conf['EMAIL_PORT'] = 25
  
      # Set defaults for `smtps`
      if url.scheme == 'smtps':
          warnings.warn(
              "`smpts` scheme will be deprecated in a future version,"
              " use `submission` instead",
              UserWarning,
          )
          conf['EMAIL_USE_TLS'] = True
  
      # Set defaults for `submission`/`submit`
      if url.scheme in ('submission', 'submit'):
          conf['EMAIL_USE_TLS'] = True
          if not conf['EMAIL_PORT']:
              conf['EMAIL_PORT'] = 587
  
      # Query args overwrite defaults
      if 'ssl' in qs and qs['ssl']:
          if qs['ssl'][0] in TRUTHY:
              conf['EMAIL_USE_SSL'] = True
              conf['EMAIL_USE_TLS'] = False
      elif 'tls' in qs and qs['tls']:
          if qs['tls'][0] in TRUTHY:
              conf['EMAIL_USE_SSL'] = False
              conf['EMAIL_USE_TLS'] = True
  
      # From addresses
      if '_server_email' in qs:
          conf['SERVER_EMAIL'] = qs['_server_email'][0]
      if '_default_from_email' in qs:
          conf['DEFAULT_FROM_EMAIL'] = qs['_default_from_email'][0]
  
      return conf