-
template_fields
-
template_fields_renderers
-
template_ext
-
ui_color
-
execute
class
airflow.operators.email.
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
)
[source]
-
Bases:
airflow.models.baseoperator.BaseOperator
Sends an email.
-
Parameters
-
to
(
list
[
str
]
|
str
) -- list of emails to send the email to. (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
-
bcc
(
list
[
str
]
|
str
|
None
) -- list of recipients to be added in BCC field
-
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.
execute
(
context
)
[source]
-
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.
-
EmailOperator.template_fields
-
EmailOperator.template_fields_renderers
-
EmailOperator.template_ext
-
EmailOperator.ui_color
-
EmailOperator.execute()
-
EmailOperator
-
template_fields
-
template_fields_renderers
-
template_ext
-
ui_color
-
execute
Apache Airflow, Apache, Airflow, the Airflow logo, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation.
All other products or name brands are trademarks of their respective holders, including The Apache Software Foundation.