| :py:mod:`airflow.operators.email` |
| ================================= |
| |
| .. py:module:: airflow.operators.email |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.operators.email.EmailOperator |
| |
| |
| |
| |
| .. py:class:: EmailOperator(*, to, subject, html_content, files = None, cc = None, bcc = None, mime_subtype = 'mixed', mime_charset = 'utf-8', conn_id = None, custom_headers = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Sends an email. |
| |
| :param to: list of emails to send the email to. (templated) |
| :param subject: subject line for the email. (templated) |
| :param html_content: content of the email, html markup |
| is allowed. (templated) |
| :param files: file names to attach in email (templated) |
| :param cc: list of recipients to be added in CC field |
| :param bcc: list of recipients to be added in BCC field |
| :param mime_subtype: MIME sub content type |
| :param mime_charset: character set parameter added to the Content-Type |
| header. |
| :param custom_headers: additional headers to add to the MIME message. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['to', 'subject', 'html_content', 'files'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.html'] |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e6faf9 |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |