airflow.providers.smtp.operators.smtp¶
类¶
发送一封电子邮件。 |
模块内容¶
- class airflow.providers.smtp.operators.smtp.EmailOperator(*, to, subject=None, html_content=None, 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]¶
基类:
airflow.models.BaseOperator
发送一封电子邮件。
- 参数:
from_email (str | None) – 发送电子邮件的发件人。(模板化)
subject (str | None) – 电子邮件的主题行。(模板化)
html_content (str | None) – 电子邮件内容,允许使用 HTML 标记。(模板化)
files (list | None) – 电子邮件中要附加的文件名。(模板化)
mime_subtype (str) – MIME 子内容类型
mime_charset (str) – 添加到 Content-Type 标头的字符集参数。
custom_headers (dict[str, Any] | None) – 要添加到 MIME 消息中的额外标头。
- template_fields: collections.abc.Sequence[str] = ('to', 'from_email', 'subject', 'html_content', 'files', 'cc', 'bcc')[source]¶
- template_ext: collections.abc.Sequence[str] = ('.html',)[source]¶