text: import logging
  import emails
  from emails.template import JinjaTemplate
  
  from src.config import settings
  
  password_reset_jwt_subject = "preset"
  
  
  def send_email(email_to: str, subject_template="", html_template="", environment={}):
      """Отправка email"""
      assert settings.EMAILS_ENABLED, "no provided configuration for email variables"
      message = emails.Message(
          subject=JinjaTemplate(subject_template),
          html=JinjaTemplate(html_template),
          mail_from=(settings.EMAILS_FROM_NAME, settings.EMAILS_FROM_EMAIL),
      )
      smtp_options = {"host": settings.SMTP_HOST, "port": settings.SMTP_PORT}
      if settings.SMTP_TLS:
          smtp_options["tls"] = True
      if settings.SMTP_USER:
          smtp_options["user"] = settings.SMTP_USER
      if settings.SMTP_PASSWORD:
          smtp_options["password"] = settings.SMTP_PASSWORD
      response = message.send(to=email_to, render=environment, smtp=smtp_options)
      logging.info(f"send email result: {response}")