airflow.providers.smtp.operators.smtp
¶
Module Contents¶
Classes¶
Sends an email. |
- class airflow.providers.smtp.operators.smtp.EmailOperator(*, to, subject, html_content, from_email=None, files=None, cc=None, bcc=None, mime_subtype='mixed', mime_charset='utf-8', conn_id='smtp_default', custom_headers=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Sends an email.
- Parameters
to (list[str] | str) – list of emails to send the email to. (templated)
from_email (str | None) – email to send from. (templated)
subject (str) – subject line for the email. (templated)
html_content (str) – content of the email, html markup is allowed. (templated)
files (list | None) – file names to attach in email (templated)
cc (list[str] | str | None) – list of recipients to be added in CC field (templated)
bcc (list[str] | str | None) – list of recipients to be added in BCC field (templated)
mime_subtype (str) – MIME sub content type
mime_charset (str) – character set parameter added to the Content-Type header.
custom_headers (dict[str, Any] | None) – additional headers to add to the MIME message.