satishmittal111 opened a new pull request #16165:
URL: https://github.com/apache/airflow/pull/16165


   The Source in send_raw_email must be a String type. mail_from=None is 
failing the SES backend for airflow alerts.
   
   Error -
   
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/airflow/models/taskinstance.py",
 line 1852, in email_alert
       send_email(self.task.email, subject, html_content)
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/airflow/utils/email.py",
 line 52, in send_email
       return backend(
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/airflow/providers/amazon/aws/utils/emailer.py",
 line 39, in send_email
       hook.send_email(
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/airflow/providers/amazon/aws/hooks/ses.py",
 line 95, in send_email
       return ses_client.send_raw_email(
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/botocore/client.py",
 line 357, in _api_call
       return self._make_api_call(operation_name, kwargs)
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/botocore/client.py",
 line 648, in _make_api_call
       request_dict = self._convert_to_request_dict(
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/botocore/client.py",
 line 696, in _convert_to_request_dict
       request_dict = self._serializer.serialize_to_request(
     File 
"/Users/username/Library/Python/3.8/lib/python/site-packages/botocore/validate.py",
 line 293, in serialize_to_request
       raise ParamValidationError(report=report.generate_report())
   botocore.exceptions.ParamValidationError: Parameter validation failed:
   Invalid type for parameter Source, value: None, type: <class 'NoneType'>, 
valid types: <class 'str'>
   
   Refer - 
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ses.html#SES.Client.send_raw_email
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to