【问题标题】:Using curl to send emails through Amazon SES使用 curl 通过 Amazon SES 发送电子邮件
【发布时间】:2016-08-03 13:18:12
【问题描述】:

使用this 链接我尝试向 Amazon SES 发送电子邮件。但不能。 错误是:

    <ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">   <Error>
        <Type>Sender</Type>
        <Code>MessageRejected</Code>
        <Message>Email address is not verified. The following identities failed the check in region US-EAST-1: noreply@myorg.com</Message>   </Error>
<RequestId>4242cec6-5002-11e6-95bf-b7dbdddce018</RequestId> </ErrorResponse>

这似乎很明显,我联系了 devops,但是唉!他们说电子邮件确实经过验证。 我试过的:

  • 使用不同的端点
  • 使用不同的电子邮件(已验证)

但同样的错误重复。

亚马逊说使用this,但我没有 smtp 用户凭据。 另外,问题仍然是为什么 curl 不起作用。有人可以帮忙吗?

编辑

为了更好的可读性添加 curl :

curl -v -X POST -H "日期:$(date -R)" -H "X-Amzn-授权: AWS3-HTTPS AWSAccessKeyId=ORG_ACCESS_KEY,算法=HmacSHA256, 签名=$(echo -n $(date -R) | openssl dgst -sha256 -hmac ORG_SECRET_KEY -二进制 | base64 -w 0)" --data-urlencode "Message.Body.Text.Data=Test Message" --data-urlencode "Destination.ToAddresses.member.1=my_email" --data-urlencode "来源=myorg_verified_email_id" --data-urlencode "操作=SendEmail" --data-urlencode "Message.Subject.Data=Test AWS Message" "https://email.us-west-2.amazonaws.com/"

【问题讨论】:

  • 您是否取消了 SES 帐户的沙盒限制?也许您也需要验证接收器?您是否尝试过验证发件人 URL?为什么您没有 SES 凭证?为什么不能生成新的?
  • 我无权访问这些信用,因为它们是组织的产品并且在团队中很常见。我询问了 Devops 的沙盒限制,他们说这没有问题。发件人 url 和盒子运行我拥有的 java 代码。只是 curl 不运行。我无法生成,因为它对大型组织来说是一种刺激。 :)
  • 我没有在 SES 中做过,但如果你想尝试一下,我可以帮助你使用 SparkPost。

标签: amazon-web-services curl


【解决方案1】:

似乎 smtp 凭据是解决此问题的唯一方法。 API 密钥和密码只能使用 amazon sdk。这个link 展示了使用 SES 进行身份验证的不同方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-10-12
    • 2017-06-05
    • 2013-02-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多