我想使用亚马逊的简单电子邮件服务发送电子邮件。

我验证了我的域名以及我想发送的电子邮件地址。

两者都显示已核实。

现在,当我从AWS控制台使用发送测试电子邮件向myemail@outlook.com发送测试电子邮件时,我只得到错误消息:

电子邮件地址未验证。下面的标识失败了 check in region EU-WEST-1: myemail@outlook.com(请求ID: 9 fb78de1 - 2673 - 11 - e6 bbbc - 5 - f819fabe4f4)

现在它让我震惊,因为它说myemail@outlook.com没有经过验证,但我试图从admin@mydomain.example发送。发送测试电子邮件对话框甚至强迫您使用已经注册的电子邮件。

如何解决这个问题?我错过什么了吗?


当前回答

在我的情况下,我需要在失败的地区再次验证电子邮件。您可以尝试更改右上角的区域,然后再次单击“验证新电子邮件地址”

其他回答

几分钟前我遇到了同样的问题,尽管这次我使用的是PHP SDK。

我必须再次检查SesClient实例化代码。

$SesClient = new SesClient([
    'profile' => 'default',
    'version' => '2010-12-01',
    'region'  => 'us-west-2',

]);

我发现实例化代码中的区域是us-west-2。 我回到我的控制台,发现SES帐户被沙盒在us-east-2(俄亥俄州)。

我在实例化代码中实现了这样的更改

$SesClient = new SesClient([
    'profile' => 'default',
    'version' => '2010-12-01',
    'region'  => 'us-east-2',

]);

现在起作用了。

在我的情况下,我需要在失败的地区再次验证电子邮件。您可以尝试更改右上角的区域,然后再次单击“验证新电子邮件地址”

在我的情况下,我想发送电子邮件到相同的验证电子邮件。 所以,我验证了我的邮件是DKIM @Greg Wozniak写的。我看到了绿色的标记,并验证了:

但我仍然看到:

Email address is not verified. The following identities failed the check in region...

在我的情况下,解决方案是在代码中添加这个函数:

def verify_email_identity():
    ses_client = boto3.client("ses", region_name="us-east-1")
    response = ses_client.verify_email_identity(
        # Email address that will receive the email 
        # In my case the same email address 
        # that was verified on Amazon SES
        EmailAddress="receipientemail@gmail.com"
    )
    print(response)

从这个网站上截取

所以,我收到了一封新的邮件来验证收件人的邮箱地址。确认收件人邮箱地址后,点击亚马逊SES发送的链接。我可以用这个代码发送邮件:

client = boto3.client('ses',region_name="us-east-1")
# Try to send the email.
try:
    #Provide the contents of the email.
    response = client.send_email(
        Destination={
            'ToAddresses': [
                receipientemail@gmail.com,
            ],
        },
        Message={
            'Body': {
                'Html': {
                    'Charset': "UTF-8",
                    'Data': "Test",
                },
            },
            'Subject': {
                'Charset': "UTF-8",
                'Data': "Test",
            },
        },
        Source=receipientemail@gmail.com,
    )
# Display an error if something goes wrong. 
except ClientError as e:
    print(e.response['Error']['Message'])
else:
    print("Email sent! Message ID:"),
    print(response['MessageId'])

@马特·豪瑟已经回答了问题,但我添加了一张2020年6月的截图,解释了他说的话。

确保

-你已经向支持客户提交了你的案例请求,并解释了确认的目的,也许他们会问你一些关于你申请的额外信息