i was able to add the SMTP env variables in the docker compose file under
x-airflow-common:
environment:
FYI, airflow has a default connection_id 'smtp_default' that can be edited with the user account credentials. You can also refer to the other ways I tried to test in this answer link airflow smtp not working with docker - section/key [smtp/smtp_user] not found in config / OSError: [Errno 99] Cannot assign requested address
Also as an alternative, you can send email by using python's smtplib in a PythonOperator callable function refer https://docs.python.org/3/library/email.examples.html