rsaleev opened a new issue, #33284:
URL: https://github.com/apache/airflow/issues/33284
### Apache Airflow version
2.6.3
### What happened
send_email doesn't work correctly. Event with 'smtp_default' connection
username for SMTP authorization is invalid
username in Email connection is valid and not ***@example.com
`2023-08-10, 09:25:13 UTC] {task_command.py:410} INFO - Running
<TaskInstance: email_tutorial.send_test_email
manual__2023-08-10T09:25:12.210644+00:00 [running]> on host 3040d0295bb6
[2023-08-10, 09:25:13 UTC] {taskinstance.py:1545} INFO - Exporting env vars:
AIRFLOW_CTX_DAG_OWNER='***' AIRFLOW_CTX_DAG_ID='email_tutorial'
AIRFLOW_CTX_TASK_ID='send_test_email'
AIRFLOW_CTX_EXECUTION_DATE='2023-08-10T09:25:12.210644+00:00'
AIRFLOW_CTX_TRY_NUMBER='1'
AIRFLOW_CTX_DAG_RUN_ID='manual__2023-08-10T09:25:12.210644+00:00'
[2023-08-10, 09:25:13 UTC] {base.py:73} INFO - Using connection ID
'smtp_default' for task execution.
[2023-08-10, 09:25:13 UTC] {email.py:268} INFO - Email alerting: attempt 1
[2023-08-10, 09:25:13 UTC] {email.py:280} INFO - Sent an alert email to
['ra@*****.**']
[2023-08-10, 09:25:13 UTC] {taskinstance.py:1824} ERROR - Task failed with
exception
Traceback (most recent call last):
File
"/home/airflow/.local/lib/python3.10/site-packages/airflow/operators/email.py",
line 77, in execute
send_email(
File
"/home/airflow/.local/lib/python3.10/site-packages/airflow/utils/email.py",
line 78, in send_email
return backend(
File
"/home/airflow/.local/lib/python3.10/site-packages/airflow/utils/email.py",
line 152, in send_email_smtp
send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg,
conn_id=conn_id, dryrun=dryrun)
File
"/home/airflow/.local/lib/python3.10/site-packages/airflow/utils/email.py",
line 281, in send_mime_email
smtp_conn.sendmail(e_from, e_to, mime_msg.as_string())
File "/usr/local/lib/python3.10/smtplib.py", line 887, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (553, b'5.7.1 Sender address rejected: not owned
by auth user. 1691659513-DPWLxXABe0U0-64GrTkjg', '***@example.com')`
### What you think should happen instead
_No response_
### How to reproduce
AIRFLOW__EMAIL__EMAIL_BACKEND: "airflow.utils.email.send_email_smtp"
AIRFLOW__EMAIL__FROM_EMAIL: "Airflow <noreply@*****.**>"
AIRFLOW__SMTP__SMTP_HOST: "smtp.yandex.ru"
AIRFLOW__SMTP__SMTP_PORT: "465"
AIRFLOW__SMTP__SMTP_STARTTLS: "False"
AIRFLOW__SMTP__SMTP_SSL: "True"
### Operating System
apache/airflow:slim-2.6.3-python3.10
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]