Visitar URL original
Add missing email type of connection by potiuk · Pull Request #18502 · apache/airflow · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
19 changes: 13 additions & 6 deletions docs/apache-airflow/howto/email-config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ in the ``[email]`` section.

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
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').

Expand Down Expand Up @@ -67,11 +67,17 @@ Airflow can be configured to send e-mail using `SendGrid <https://sendgrid.com/>

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.

Expand All @@ -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:

Expand All @@ -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``.