简体   繁体   English

Amazon SES-SMTP错误状态码403:SignatureDoesNotMatch

[英]Amazon SES - SMTP Error Status Code 403: SignatureDoesNotMatch

I created amazon trail account to test SES SMTP service, but i got following error 我创建了Amazon Trail帐户来测试SES SMTP服务,但出现以下错误

{ [SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.


The Canonical String for this request should have been
'POST
/
host:email.us-west-2.amazonaws.com
x-amz-content-sha256:72ac6f1d5dc1a4218fc4076dea3277a8a676b15e2c5143229cb3503465817440
x-amz-date:20160912T084424Z

host;x-amz-content-sha256;x-amz-date
72ac6f1d5dc1a4218fc4076dea3277a8a676b15e2c5143229cb3503465817440'

The String-to-Sign should have been
AWS4-HMAC-SHA256
20160912T084424Z
20160912/us-west-2/ses/aws4_request
a1b9fe2e23bbd4456f9b2a8f4115bd84571b8ccbbf9612d2e6b9d330ca6975a7'
]
  message: 'The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\n\nThe Canonical String for this request should have been\n\'POST\n/\n\nhost:email.us-west-2.amazonaws.com\nx
-amz-content-sha256:72ac6f1d5dc1a4218fc4076dea3277a8a676b15e2c5143229cb3503465817440\nx-amz-date:20160912T084424Z\n\nhost;x-amz-content-sha256;x-amz-d
ate\n72ac6f1d5dc1a4218fc4076dea3277a8a676b15e2c5143229cb3503465817440\'\n\nThe String-to-Sign should have been\n\'AWS4-HMAC-SHA256\n20160912T084424Z\n
20160912/us-west-2/ses/aws4_request\na1b9fe2e23bbd4456f9b2a8f4115bd84571b8ccbbf9612d2e6b9d330ca6975a7\'\n',
  code: 'SignatureDoesNotMatch',
  time: Mon Sep 12 2016 14:14:27 GMT+0530 (India Standard Time),
  requestId: '1cc26156-78c5-11e6-8397-a55641b47b84',
  statusCode: 403,
  retryable: false,
  retryDelay: 55.79463441390544 }

Here is the NodeJS script, that i am using 这是我正在使用的NodeJS脚本

var aws = require('aws-sdk');
var ses = new aws.SES({
    'accessKeyId': 'KEY',
    'secretAccessKey': 'SECRET',
    'region': 'REGION'
});
var eparam = {
    Destination: {
        ToAddresses: ['mirXXXX@gmail.com']
    },
    Message: {
        Body: {
            Html: {
                Data: '<p>Hello, this is a test email!</p>'
            },
            Text: {
                Data: 'Hello, this is a test email!'
            }
        },
        Subject: {
            Data: 'SES email test'
        }
    },
    Source: 'mirXXXX@outlook.com',
    ReplyToAddresses: ['mirXXXX@outlook.com'],
    ReturnPath: 'mirXXXX@outlook.com'
};

ses.sendEmail(eparam, function (err, data) {
    if (err) console.log(err);
    else console.log(data);
});

Please note: 请注意:

emailids mirXXXX@outlook.com and mirXXXX@gamil.com both are verified. emailids mirXXXX@outlook.com和mirXXXX@gamil.com均已通过验证。 my SES Region is us-west-2 我的SES地区位于us-west-2

I have been having the same issue, I ended up using a SMTP setup, similar to this tutorial , and downgraded to from 2.6 -> 0.7.1 to get my mail to send. 我遇到了同样的问题,最终我使用了类似于本教程的SMTP设置,并从2.6-> 0.7.1降级到要发送的邮件。 There is some sort of configuration issue somewhere that isn't documented well enough to be found after two days of specific google searches. 在经过两天的特定Google搜索后,某处存在某种配置问题,但记录不足,无法找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取SignatureDoesNotMatch错误亚马逊MWS - Getting SignatureDoesNotMatch error Amazon MWS NodeJS 的 Amazon S3 SignatureDoesNotMatch 错误 - Amazon S3 SignatureDoesNotMatch error with NodeJS 403将PutObject与awssum v0.6.1一起使用时出现403 SignatureDoesNotMatch错误 - 403 SignatureDoesNotMatch error when using PutObject with awssum v0.6.1 Node.js Amazon S3-下载失败并出现SignatureDoesNotMatch错误 - Node.js Amazon S3 - Download fails with SignatureDoesNotMatch error Node.js:错误:403状态代码正在下载tarball - Node.js: Error: 403 status code downloading tarball AWS S3-从getSignedUrl()输入URL会返回403 SignatureDoesNotMatch错误 - AWS S3 - PUT to URL from getSignedUrl() returns 403 SignatureDoesNotMatch error 使用带有 ReactJs/NodeJS 的预签名 url 将图像上传到 s3 会引发 403 错误 SignatureDoesNotMatch - Image upload to s3 using presigned url with ReactJs/NodeJS throws 403 error SignatureDoesNotMatch 使用Amazon SES和Node.js弹出电子邮件的代码 - Code for bouncing emails using Amazon SES and Node.js 亚马逊销售伙伴 API 403 - 签名错误 - Amazon Selling Partner API 403 - Signature Error Error: Status Code is 403 (MongoDB's 404) 这意味着请求的版本-平台组合不存在 - Error: Status Code is 403 (MongoDB's 404) This means that the requested version-platform combination dosnt exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM