You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by pi...@apache.org on 2023/03/06 21:46:57 UTC

[airflow] 13/37: Email Config docs more explicit env var examples (#28845)

This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 9f3fecbdbc0a0e8b212a0a42a86839328b2afdb1
Author: Pavel T <pa...@gmail.com>
AuthorDate: Mon Feb 20 13:40:34 2023 -0500

    Email Config docs more explicit env var examples (#28845)
    
    Co-authored-by: Jarek Potiuk <ja...@potiuk.com>
    Co-authored-by: Bas Harenslak <Ba...@users.noreply.github.com>
    Co-authored-by: Tzu-ping Chung <ur...@gmail.com>
    (cherry picked from commit d306067369d432dc81129947e730fc13de035f76)
---
 docs/apache-airflow/howto/email-config.rst | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/docs/apache-airflow/howto/email-config.rst b/docs/apache-airflow/howto/email-config.rst
index b66224aee5..014a2e2464 100644
--- a/docs/apache-airflow/howto/email-config.rst
+++ b/docs/apache-airflow/howto/email-config.rst
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block:: sh
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "John Doe <jo...@example.com>"
+
+Equivalent environment variables look like:
+
+.. code-block:: sh
+
+  AIRFLOW__EMAIL__FROM_EMAIL="John Doe <jo...@example.com>"
+
 
 To configure SMTP settings, checkout the :ref:`SMTP <config:smtp>` section in the standard configuration.
 If you do not want to store the SMTP credentials in the config or in the environment variables, you can create a