airflow.providers.amazon.aws.operators.ses¶
Send email using Amazon Simple Email Service (SES).
Classes¶
Send an email using Amazon Simple Email Service (SES). |
Module Contents¶
- class airflow.providers.amazon.aws.operators.ses.SesEmailOperator(*, mail_from, to, subject, html_content, files=None, cc=None, bcc=None, mime_subtype='mixed', mime_charset='utf-8', reply_to=None, return_path=None, custom_headers=None, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.ses.SesHook]Send an email using Amazon Simple Email Service (SES).
See also
For more information on how to use this operator, take a look at the guide: Send an email using Amazon SES
- Parameters:
mail_from (str) – Email address to set as email’s from (templated)
to (str | collections.abc.Iterable[str]) – List of email addresses to set as email’s to (templated)
subject (str) – Email’s subject (templated)
html_content (str) – Content of email in HTML format (templated)
files (list[str] | None) – List of paths of files to be attached
cc (str | collections.abc.Iterable[str] | None) – List of email addresses to set as email’s CC (templated)
bcc (str | collections.abc.Iterable[str] | None) – List of email addresses to set as email’s BCC (templated)
mime_subtype (str) – Can be used to specify the subtype of the message. Default = mixed
mime_charset (str) – Email’s charset. Default = UTF-8
reply_to (str | None) – The email address to which replies will be sent
return_path (str | None) – The email address to which message bounces and complaints should be sent
custom_headers (dict[str, Any] | None) – Additional headers to add to the MIME message
aws_conn_id – The Airflow connection used for AWS credentials. If this is
Noneor empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).region_name – AWS region_name. If not specified then the default boto3 behaviour is used.
verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html
botocore_config – Configuration dictionary (key-values) for botocore client. See: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html
- template_fields: collections.abc.Sequence[str][source]¶
- execute(context)[source]¶
Send email using Amazon SES.
- Parameters:
context (airflow.sdk.Context) – The task context
- Returns:
Response from Amazon SES service with unique message identifier
- Return type: