airflow.providers.smtp.notifications.smtp
¶
Module Contents¶
Classes¶
SMTP Notifier. |
Attributes¶
- class airflow.providers.smtp.notifications.smtp.SmtpNotifier(from_email, to, subject=None, html_content=None, files=None, cc=None, bcc=None, mime_subtype='mixed', mime_charset='utf-8', custom_headers=None, smtp_conn_id=SmtpHook.default_conn_name, *, template=None)[source]¶
Bases:
airflow.notifications.basenotifier.BaseNotifier
SMTP Notifier.
Accepts keyword arguments. The only required arguments are from_email and to. Examples:
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 can be overridden via the following provider configuration data:
templated_email_subject_path
templated_html_content_path
- Parameters
smtp_conn_id (str) – The smtp connection id that contains the information used to authenticate the client.