Comments (9)
It sounds like a value needs to be set for AWS_SES_RETURN_PATH
even though it's expected to be optional. That might be your short-term fix for now.
@peidrao can you fix so it can be optional in a follow-up?
from django-ses.
This has been fixed in #279 and released as v3.4.1 on PyPi
Thanks for the quick fix!
from django-ses.
I'll check it
from django-ses.
@rodrigondec skipping the param when it's None makes sense to me. Go ahead and PR that and I'll release a patch version. If you can't reproduce the issue by setting to None
on v3.4.0, we can have the reporting user test it.
But worth a try if you can reproduce it with None
(or omitting the setting). Make sure USE_SES_V2
is set
from django-ses.
Problem reproduced
Traceback (most recent call last):
File "/home/rodrigondec/prog/imobanco/income-back/.venv/lib/python3.9/site-packages/django/core/mail/message.py", line 284, in send
return self.get_connection(fail_silently).send_messages([self])
File "/home/rodrigondec/prog/imobanco/income-back/.venv/lib/python3.9/site-packages/django_ses/__init__.py", line 166, in send_messages
response = (self.connection.send_email(**kwargs)
File "/home/rodrigondec/prog/imobanco/income-back/.venv/lib/python3.9/site-packages/botocore/client.py", line 530, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/rodrigondec/prog/imobanco/income-back/.venv/lib/python3.9/site-packages/botocore/client.py", line 919, in _make_api_call
request_dict = self._convert_to_request_dict(
File "/home/rodrigondec/prog/imobanco/income-back/.venv/lib/python3.9/site-packages/botocore/client.py", line 990, in _convert_to_request_dict
request_dict = self._serializer.serialize_to_request(
File "/home/rodrigondec/prog/imobanco/income-back/.venv/lib/python3.9/site-packages/botocore/validate.py", line 381, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter FeedbackForwardingEmailAddress, value: None, type: <class 'NoneType'>, valid types: <class 'str'>
We verified the solution performing a regression test using the install from the branch on our fork https://github.com/imobanco/django-ses/tree/fix/feedback_none.
from django-ses.
Thank you!
from django-ses.
@peidrao @rodrigondec have you come across this? Is it related to the change in #276 ?
Does this issue happen in v3.3.0 too @metalaureate ? If not, it could have to do with the from address not being verified. See here: #276 (comment)
from django-ses.
from django-ses.
We forgot to check if email_feedback is None
to use the arg FeedbackForwardingEmailAddress
django-ses/django_ses/__init__.py
Lines 247 to 270 in 8295661
I think this would resolve the issue
def _get_v2_parameters(self, message, source, email_feedback):
"""V2-Style raw payload for `send_email`.
https://boto3.amazonaws.com/v1/documentation/api/1.26.31/reference/services/sesv2.html#SESV2.Client.send_email
"""
params = dict(
FromEmailAddress=source or message.from_email,
Destination={
'ToAddresses': message.recipients()
},
Content={
'Raw': {
'Data': dkim_sign(message.message().as_string(),
dkim_key=self.dkim_key,
dkim_domain=self.dkim_domain,
dkim_selector=self.dkim_selector,
dkim_headers=self.dkim_headers)
}
}
)
if self.ses_from_arn or self.ses_source_arn:
params['FromEmailAddressIdentityArn'] = self.ses_from_arn or self.ses_source_arn
if email_feedback is not None:
params['FeedbackForwardingEmailAddress'] = email_feedback
return params
To be sure that this is the error I would need to reproduce the error and the full stack trace. But my guess is that this error is a validation error from the lib boto3. The arg FeedbackForwardingEmailAddress=None
must be invalid and the arg should not be used without value.
from django-ses.
Related Issues (20)
- Cannot install django-ses on Ubuntu 18.04: version not found HOT 2
- Is it possible to update the version of importlib-metadata? HOT 5
- Receive emails HOT 1
- AWS_SES_REGION_ENDPOINT connection error HOT 11
- SES Signature Version 4 Error Message HOT 1
- Support newer versions of cryptography and requests for events extra HOT 6
- AWS_SES_RETURN_PATH not working as expected HOT 5
- SES expecting recipient email to be verified HOT 1
- Thanks and some stats HOT 1
- UnrecognizedClientException when calling the GetAccount operation HOT 9
- Where does one set up handlers? HOT 3
- Pip install django-ses[events] doesnt work HOT 1
- Caching of the SES rate limit is broken when using an IAM role HOT 3
- Receiver address needs to be verified on Production AWS SES server. HOT 3
- Issue with Downloading - Long Wait Time HOT 2
- pypi points to old repo HOT 3
- Replace pytz with zoneinfo HOT 1
- Unicode issue when sending with python 3.11.9, 3.12.3 HOT 5
- Use AWS Session for authenticating with AWS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ses.