Amazon SES verifyEmailIdentity 不发送电子邮件

Amazon SES verifyEmailIdentity is not sending email

我想通过 javascript/Node.JS.

中的 Amazon SES 服务自动执行授权电子邮件地址发送邮件的过程

我们已经通过 Node 发送邮件并且工作正常,但我无法正常工作。

我到目前为止:

function verifyEmail(email, callback){
    var sesService = new AWS.SES({
        accessKeyId: "mykey",
        secretAccessKey: 'myaccesskey',
        region: 'eu-west-1'
    });
    sesService.verifyEmailIdentity({EmailAddress: email}, function(err, data){
        console.log("verifyEmailIdentity", err, data);
        return callback(err, data);        
    })
}

在日志中我得到这个:

verifyEmailIdentity 为空 对象 {ResponseMetadata: 对象}

ResponseMetadata 对象包含 RequestId:"some-string"

所以,我没有收到错误消息,但我也没有收到确认此请求的电子邮件。

密钥已添加 AmazonSESFullAccess 策略,因此有足够的权限来完成此操作。

我想我忘记了一些非常简单的东西,但是根据亚马逊的文档我找不到什么。而且 javascript 的例子不多,所以我无法将我的代码与其他代码进行比较。

仍然不知道为什么这不起作用,但现在它起作用了。

我们已经计划创建一个自定义验证模板 (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html),我在使用 CLI 等待答案时创建了一个模板。

要使用此模板,我们必须使用 AWS 的 sendCustomVerificationEmail() 函数。 你猜怎么着?使用该功能,邮件已发送,我可以验证请求的电子邮件地址!

verifyMail 函数现在看起来像:

function verifyEmail(email, callback){
    sesService.sendCustomVerificationEmail({
        EmailAddress: email,
        TemplateName: 'MyTemplateName'
        },function(err, data){
            console.log("verifyEmailIdentity", err, data);
            return callback(err, data);        
    })
}