diff --git a/airflow/www/views.py b/airflow/www/views.py index 115a4231b1e6c..b7b6152557cfe 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -3297,6 +3297,7 @@ def _get_connection_types() -> List[Tuple[str, str]]: _connection_types = [ ('fs', 'File (path)'), ('mesos_framework-id', 'Mesos Framework ID'), + ('email', 'Email'), ] providers_manager = ProvidersManager() for connection_type, provider_info in providers_manager.hooks.items(): diff --git a/docs/apache-airflow/howto/email-config.rst b/docs/apache-airflow/howto/email-config.rst index 4c6d009cd7b6d..67e26a7ca8a59 100644 --- a/docs/apache-airflow/howto/email-config.rst +++ b/docs/apache-airflow/howto/email-config.rst @@ -31,7 +31,7 @@ in the ``[email]`` section. To configure SMTP settings, checkout the :ref:`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 -connection called ``smtp_default``, or choose a custom connection name and set the ``email_conn_id`` with it's name in +connection called ``smtp_default`` of ``Email`` type, or choose a custom connection name and set the ``email_conn_id`` with it's name in the configuration & store SMTP username-password in it. Other SMTP settings like host, port etc always gets picked up from the configuration only. The connection can be of any type (for example 'HTTP connection'). @@ -67,11 +67,17 @@ Airflow can be configured to send e-mail using `SendGrid Follow the steps below to enable it: -1. Include ``sendgrid`` subpackage as part of your Airflow installation, e.g., +1. Include ``sendgrid`` provider as part of your Airflow installation, e.g., - .. code-block:: ini + .. code-block:: bash + + pip install 'apache-airflow[sendgrid]' --constraint ... + +or + .. code-block:: bash + + pip install 'apache-airflow-providers-sendgrid' --constraint ... - pip install 'apache-airflow[sendgrid]' 2. Update ``email_backend`` property in ``[email]`` section in ``airflow.cfg``, i.e. @@ -82,7 +88,8 @@ Follow the steps below to enable it: email_conn_id = sendgrid_default 3. Create a connection called ``sendgrid_default``, or choose a custom connection - name and set it in ``email_conn_id``. + name and set it in ``email_conn_id`` of 'Email' type. Only login and password + are used from the connection. .. _email-configuration-ses: @@ -108,4 +115,4 @@ Follow the steps below to enable it: email_conn_id = aws_default 3. Create a connection called ``aws_default``, or choose a custom connection - name and set it in ``email_conn_id``. + name and set it in ``email_conn_id``. The type of connection should be ``Amazon Web Services``.