kolban-google opened a new issue #18077:
URL: https://github.com/apache/airflow/issues/18077


   ### Apache Airflow version
   
   2.1.2
   
   ### Operating System
   
   Debian
   
   ### Versions of Apache Airflow Providers
   
   Google Composer
   
   ### Deployment
   
   Composer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   I was trying to configure sending of alerts via SMTP.  I must have made a 
configuration error and I get the error "Failed to send".  Searching in the 
code I find the following:
   
   
https://github.com/apache/airflow/blob/944dcfbb918050274fd3a1cc51d8fdf460ea2429/airflow/models/taskinstance.py#L1719
   
   What this shows is:
   
   ```
   if email_for_state and task.email:
               try:
                   self.email_alert(error)
               except Exception:
                   self.log.exception('Failed to send email to: %s', task.email)
   ```
   
   what this means is that if an exception occurs while sending an email, all 
we get is a "Failed to send" error and the diagnostics of why we failed to send 
have been lost.
   
   ### What you expected to happen
   
   I would like to see additional debuging on why the email failed to send.  
Presumably this would be the exception text from the underlying call to send an 
email.
   
   ### How to reproduce
   
   _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]


Reply via email to