Configuration Reference¶
This page contains the list of all available Airflow configurations for the
apache-airflow-providers-smtp
provider that can be set in the airflow.cfg
file or using environment variables.
Note
The configuration embedded in provider packages started to be used as of Airflow 2.7.0. Previously the configuration was described and configured in the Airflow core package - so if you are using Airflow below 2.7.0, look at Airflow documentation for the list of available configuration options that were available in Airflow core.
Note
For more information see Setting Configuration Options.
Sections:
[smtp_provider]¶
Options for SMTP provider.
ssl_context¶
New in version 1.3.0.
ssl context to use when using SMTP and IMAP SSL connections. By default, the context is “default”
which sets it to ssl.create_default_context()
which provides the right balance between
compatibility and security, it however requires that certificates in your operating system are
updated and that SMTP/IMAP servers of yours have valid certificates that have corresponding public
keys installed on your machines. You can switch it to “none” if you want to disable checking
of the certificates, but it is not recommended as it allows MITM (man-in-the-middle) attacks
if your infrastructure is not sufficiently secured. It should only be set temporarily while you
are fixing your certificate configuration. This can be typically done by upgrading to newer
version of the operating system you run Airflow components on,by upgrading/refreshing proper
certificates in the OS or by updating certificates for your mail servers.
If you do not set this option explicitly, it will use Airflow “email.ssl_context” configuration, but if this configuration is not present, it will use “default” value.
- Type
string
- Default
None
- Environment Variable
AIRFLOW__SMTP_PROVIDER__SSL_CONTEXT
- Example
default
templated_email_subject_path¶
New in version 1.6.1.
Allows overriding of the standard templated email subject line when the SmtpNotifier is used. Must provide a path to the template.
- Type
string
- Default
None
- Environment Variable
AIRFLOW__SMTP_PROVIDER__TEMPLATED_EMAIL_SUBJECT_PATH
- Example
path/to/override/email_subject.html
templated_html_content_path¶
New in version 1.6.1.
Allows overriding of the standard templated email path when the SmtpNotifier is used. Must provide a path to the template.
- Type
string
- Default
None
- Environment Variable
AIRFLOW__SMTP_PROVIDER__TEMPLATED_HTML_CONTENT_PATH
- Example
path/to/override/email.html