Unknown parameter in Destination: “ReplyToAddresses”, must be one of: ToAddresses, CcAddresses,...











up vote
0
down vote

favorite












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?










share|improve this question


























    up vote
    0
    down vote

    favorite












    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?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      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?










      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 at 16:47









      Mark Amery

      58.5k30234276




      58.5k30234276
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          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',
          ])





          share|improve this answer





















          • 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 at 17:19













          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',
          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
          });


          }
          });














           

          draft saved


          draft discarded


















          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








          up vote
          1
          down vote



          accepted










          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',
          ])





          share|improve this answer





















          • 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 at 17:19

















          up vote
          1
          down vote



          accepted










          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',
          ])





          share|improve this answer





















          • 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 at 17:19















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          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',
          ])





          share|improve this answer












          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',
          ])






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 19 at 17:01









          Oniro

          586




          586












          • 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 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 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 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 at 17:19




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Feedback on college project

          Futebolista

          Albești (Vaslui)