class_docstr: SMTP Notifier.
  
  Accepts keyword arguments. The only required argument is `to`. Examples:
  
  .. code-block:: python
  
      EmptyOperator(task_id="task", on_failure_callback=SmtpNotifier(from_email=None, to="myemail@myemail.com"))
  
      EmptyOperator(
          task_id="task",
          on_failure_callback=SmtpNotifier(
              from_email="myemail@myemail.com",
              to="myemail@myemail.com",
              subject="Task {{ ti.task_id }} failed",
          ),
      )
  
  Default template is defined in airflow.settings but can be overridden in local_settings.py
  
  :param smtp_conn_id: The :ref:`smtp connection id <howto/connection:smtp>`
      that contains the information used to authenticate the client.
class_docstr_tok: ["SMTP","Notifier",".","Accepts","keyword","arguments",".","The","only","required","argument","is","`","to","`",".","Examples",":","..","code-block",":",":","python","EmptyOperator","(","task_id=","''","task","''",",","on_failure_callback=SmtpNotifier","(","from_email=None",",","to=","''","myemail","@","myemail.com","''",")",")","EmptyOperator","(","task_id=","''","task","''",",","on_failure_callback=SmtpNotifier","(","from_email=","''","myemail","@","myemail.com","''",",","to=","''","myemail","@","myemail.com","''",",","subject=","''","Task","{","{","ti.task_id","}","}","failed","''",",",")",",",")","Default","template","is","defined","in","airflow.settings","but","can","be","overridden","in","local_settings.py",":","param","smtp_conn_id",":","The",":","ref",":","`","smtp","connection","id","<","howto\/connection",":","smtp",">","`","that","contains","the","information","used","to","authenticate","the","client","."]
docstr: Send a email via smtp server.
docstr_tok: ["Send","a","email","via","smtp","server","."]
code: def notify(self, context):
      """Send a email via smtp server."""
      with self.hook as smtp:
          smtp.send_email_smtp(
              smtp_conn_id=self.smtp_conn_id,
              from_email=self.from_email,
              to=self.to,
              subject=self.subject,
              html_content=self.html_content,
              files=self.files,
              cc=self.cc,
              bcc=self.bcc,
              mime_subtype=self.mime_subtype,
              mime_charset=self.mime_charset,
              custom_headers=self.custom_headers,
          )
  
file_path: airflow/airflow/providers/smtp/notifications/smtp.py
imports: from __future__ import annotations
  from functools import cached_property
  from pathlib import Path
  from typing import Any, Iterable
  from airflow.configuration import conf
  from airflow.notifications.basenotifier import BaseNotifier
  from airflow.providers.smtp.hooks.smtp import SmtpHook
label_desc: Use image node_id 3 for calling the SmtpNotifier obj's underlying member method code with example usage: obj.notify(context) without return types