Skip to main content
Version: 1.3.10

EmailAction

Signature

class great_expectations.checkpoint.EmailAction(
*,
type: Literal['email'] = 'email',
name: str,
smtp_address: Union[great_expectations.datasource.fluent.config_str.ConfigStr,
str],
smtp_port: Union[great_expectations.datasource.fluent.config_str.ConfigStr,
str],
receiver_emails: Union[great_expectations.datasource.fluent.config_str.ConfigStr,
str],
sender_login: Optional[Union[great_expectations.datasource.fluent.config_str.ConfigStr,
str]] = None,
sender_password: Optional[Union[great_expectations.datasource.fluent.config_str.ConfigStr,
str]] = None,
sender_alias: Optional[Union[great_expectations.datasource.fluent.config_str.ConfigStr,
str]] = None,
use_tls: Optional[bool] = None,
use_ssl: Optional[bool] = None,
notify_on: Literal['all',
'failure',
'success'] = 'all',
notify_with: Optional[List[str]] = None,
renderer: great_expectations.render.renderer.email_renderer.EmailRenderer = None
)

Sends an email to a given list of email addresses.

- name: send_email_on_validation_result
action:
class_name: EmailAction
notify_on: all # possible values: "all", "failure", "success"
notify_with:
renderer:
# the class that implements the message to be sent
# this is the default implementation, but you can
# implement a custom one
module_name: great_expectations.render.renderer.email_renderer
class_name: EmailRenderer
# put the actual following information in the uncommitted/config_variables.yml file
# or pass in as environment variable
smtp_address: ${smtp_address}
smtp_port: ${smtp_port}
sender_login: ${email_address}
sender_password: ${sender_password}
sender_alias: ${sender_alias} # useful to send an email as an alias
receiver_emails: ${receiver_emails}
use_tls: False
use_ssl: True

Examples

renderer:

{
"module_name": "great_expectations.render.renderer.email_renderer",
"class_name": "EmailRenderer",
}

Parameters

NameDescription

renderer

Specifies the renderer used to generate an email.

smtp_address

Address of the SMTP server used to send the email.

smtp_address

Port of the SMTP server used to send the email.

sender_login

Login used send the email.

sender_password

Password used to send the email.

sender_alias

Optional. Alias used to send the email (default = sender_login).

receiver_emails

Email addresses that will receive the email (separated by commas).

use_tls

Optional. Use of TLS to send the email (using either TLS or SSL is highly recommended).

use_ssl

Optional. Use of SSL to send the email (using either TLS or SSL is highly recommended).

notify_on

"Specifies validation status that triggers notification. One of "all", "failure", "success".

notify_with

Optional list of DataDocs site names to display in Slack messages. Defaults to all.