Unknown parameter in Destination: “ReplyToAddresses”, must be one of: ToAddresses, CcAddresses,...
If I try to use Boto 3 to send an email with SES with a Reply-To
header that doesn't match some other header in the email, using a script like this...
import boto3
client = boto3.client('ses')
client.send_email(
Destination={
'ToAddresses': [
"someone@example.com"
],
'ReplyToAddresses': [
"someoneelse@example.com"
]
},
Message={
'Body': {
'Text': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
'Subject': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
Source="My Company <noreply@example.com>",
)
... then I receive an error like this:
Traceback (most recent call last):
File "/Users/markamery/test.py", line 24, in <module>
Source="My Company <noreply@shielddx.com>",
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 596, in _make_api_call
api_params, operation_model, context=request_context)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 632, in _convert_to_request_dict
api_params, operation_model)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in Destination: "ReplyToAddresses", must be one of: ToAddresses, CcAddresses, BccAddresses
This doesn't make much sense to me. What I'm trying to do here seems to be a best practice (see https://stackoverflow.com/a/14555043/1709587) and according to https://forums.aws.amazon.com/thread.jspa?threadID=60093&tstart=0, as of 2011, you can use "any email address" in the "Reply-To" header.
What causes this error? Have SES's rules been changed again since that forum post from 2011? Is the error I see above an undocumented restriction for accounts that are in the sandbox, like mine? Or is this a bug - is Boto 3, on the client side, applying stricter validation of ReplyToAddresses
than the AWS API itself does?
python amazon-web-services boto3 amazon-ses
add a comment |
If I try to use Boto 3 to send an email with SES with a Reply-To
header that doesn't match some other header in the email, using a script like this...
import boto3
client = boto3.client('ses')
client.send_email(
Destination={
'ToAddresses': [
"someone@example.com"
],
'ReplyToAddresses': [
"someoneelse@example.com"
]
},
Message={
'Body': {
'Text': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
'Subject': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
Source="My Company <noreply@example.com>",
)
... then I receive an error like this:
Traceback (most recent call last):
File "/Users/markamery/test.py", line 24, in <module>
Source="My Company <noreply@shielddx.com>",
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 596, in _make_api_call
api_params, operation_model, context=request_context)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 632, in _convert_to_request_dict
api_params, operation_model)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in Destination: "ReplyToAddresses", must be one of: ToAddresses, CcAddresses, BccAddresses
This doesn't make much sense to me. What I'm trying to do here seems to be a best practice (see https://stackoverflow.com/a/14555043/1709587) and according to https://forums.aws.amazon.com/thread.jspa?threadID=60093&tstart=0, as of 2011, you can use "any email address" in the "Reply-To" header.
What causes this error? Have SES's rules been changed again since that forum post from 2011? Is the error I see above an undocumented restriction for accounts that are in the sandbox, like mine? Or is this a bug - is Boto 3, on the client side, applying stricter validation of ReplyToAddresses
than the AWS API itself does?
python amazon-web-services boto3 amazon-ses
add a comment |
If I try to use Boto 3 to send an email with SES with a Reply-To
header that doesn't match some other header in the email, using a script like this...
import boto3
client = boto3.client('ses')
client.send_email(
Destination={
'ToAddresses': [
"someone@example.com"
],
'ReplyToAddresses': [
"someoneelse@example.com"
]
},
Message={
'Body': {
'Text': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
'Subject': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
Source="My Company <noreply@example.com>",
)
... then I receive an error like this:
Traceback (most recent call last):
File "/Users/markamery/test.py", line 24, in <module>
Source="My Company <noreply@shielddx.com>",
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 596, in _make_api_call
api_params, operation_model, context=request_context)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 632, in _convert_to_request_dict
api_params, operation_model)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in Destination: "ReplyToAddresses", must be one of: ToAddresses, CcAddresses, BccAddresses
This doesn't make much sense to me. What I'm trying to do here seems to be a best practice (see https://stackoverflow.com/a/14555043/1709587) and according to https://forums.aws.amazon.com/thread.jspa?threadID=60093&tstart=0, as of 2011, you can use "any email address" in the "Reply-To" header.
What causes this error? Have SES's rules been changed again since that forum post from 2011? Is the error I see above an undocumented restriction for accounts that are in the sandbox, like mine? Or is this a bug - is Boto 3, on the client side, applying stricter validation of ReplyToAddresses
than the AWS API itself does?
python amazon-web-services boto3 amazon-ses
If I try to use Boto 3 to send an email with SES with a Reply-To
header that doesn't match some other header in the email, using a script like this...
import boto3
client = boto3.client('ses')
client.send_email(
Destination={
'ToAddresses': [
"someone@example.com"
],
'ReplyToAddresses': [
"someoneelse@example.com"
]
},
Message={
'Body': {
'Text': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
'Subject': {
'Charset': "UTF-8",
'Data': 'Bla bla bla',
},
},
Source="My Company <noreply@example.com>",
)
... then I receive an error like this:
Traceback (most recent call last):
File "/Users/markamery/test.py", line 24, in <module>
Source="My Company <noreply@shielddx.com>",
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 596, in _make_api_call
api_params, operation_model, context=request_context)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/client.py", line 632, in _convert_to_request_dict
api_params, operation_model)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in Destination: "ReplyToAddresses", must be one of: ToAddresses, CcAddresses, BccAddresses
This doesn't make much sense to me. What I'm trying to do here seems to be a best practice (see https://stackoverflow.com/a/14555043/1709587) and according to https://forums.aws.amazon.com/thread.jspa?threadID=60093&tstart=0, as of 2011, you can use "any email address" in the "Reply-To" header.
What causes this error? Have SES's rules been changed again since that forum post from 2011? Is the error I see above an undocumented restriction for accounts that are in the sandbox, like mine? Or is this a bug - is Boto 3, on the client side, applying stricter validation of ReplyToAddresses
than the AWS API itself does?
python amazon-web-services boto3 amazon-ses
python amazon-web-services boto3 amazon-ses
asked Nov 19 '18 at 16:47
Mark AmeryMark Amery
62.2k31248294
62.2k31248294
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
According to the boto3 docs you need to put the list of reply-to adresses in an argument outside of the Destinations argument. It seems strange to me too.
send_mail(
...,
Destination={...},
ReplyToAddresses=[
'someoneelse@example.com',
])
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; theReply-To
address is not a destination for the email, so doesn't logically belong in theDestination
parameter. I was misinterpreting the error message to mean that one of myReply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter nameReplyToAddresses
was "unknown". Suddenly the error makes total sense.
– Mark Amery
Nov 19 '18 at 17:19
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379208%2funknown-parameter-in-destination-replytoaddresses-must-be-one-of-toaddresse%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
According to the boto3 docs you need to put the list of reply-to adresses in an argument outside of the Destinations argument. It seems strange to me too.
send_mail(
...,
Destination={...},
ReplyToAddresses=[
'someoneelse@example.com',
])
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; theReply-To
address is not a destination for the email, so doesn't logically belong in theDestination
parameter. I was misinterpreting the error message to mean that one of myReply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter nameReplyToAddresses
was "unknown". Suddenly the error makes total sense.
– Mark Amery
Nov 19 '18 at 17:19
add a comment |
According to the boto3 docs you need to put the list of reply-to adresses in an argument outside of the Destinations argument. It seems strange to me too.
send_mail(
...,
Destination={...},
ReplyToAddresses=[
'someoneelse@example.com',
])
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; theReply-To
address is not a destination for the email, so doesn't logically belong in theDestination
parameter. I was misinterpreting the error message to mean that one of myReply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter nameReplyToAddresses
was "unknown". Suddenly the error makes total sense.
– Mark Amery
Nov 19 '18 at 17:19
add a comment |
According to the boto3 docs you need to put the list of reply-to adresses in an argument outside of the Destinations argument. It seems strange to me too.
send_mail(
...,
Destination={...},
ReplyToAddresses=[
'someoneelse@example.com',
])
According to the boto3 docs you need to put the list of reply-to adresses in an argument outside of the Destinations argument. It seems strange to me too.
send_mail(
...,
Destination={...},
ReplyToAddresses=[
'someoneelse@example.com',
])
answered Nov 19 '18 at 17:01
TaekTaek
6319
6319
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; theReply-To
address is not a destination for the email, so doesn't logically belong in theDestination
parameter. I was misinterpreting the error message to mean that one of myReply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter nameReplyToAddresses
was "unknown". Suddenly the error makes total sense.
– Mark Amery
Nov 19 '18 at 17:19
add a comment |
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; theReply-To
address is not a destination for the email, so doesn't logically belong in theDestination
parameter. I was misinterpreting the error message to mean that one of myReply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter nameReplyToAddresses
was "unknown". Suddenly the error makes total sense.
– Mark Amery
Nov 19 '18 at 17:19
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; the
Reply-To
address is not a destination for the email, so doesn't logically belong in the Destination
parameter. I was misinterpreting the error message to mean that one of my Reply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter name ReplyToAddresses
was "unknown". Suddenly the error makes total sense.– Mark Amery
Nov 19 '18 at 17:19
Oh man, I'm an idiot. I would delete this question out of embarrassment, except that perhaps somebody else will make the same mistake and benefit from it. This actually makes perfect sense; the
Reply-To
address is not a destination for the email, so doesn't logically belong in the Destination
parameter. I was misinterpreting the error message to mean that one of my Reply-To
addresses was "unknown" by virtue of not being included in the destinations list, when really it was telling my that the parameter name ReplyToAddresses
was "unknown". Suddenly the error makes total sense.– Mark Amery
Nov 19 '18 at 17:19
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53379208%2funknown-parameter-in-destination-replytoaddresses-must-be-one-of-toaddresse%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown