无法在 AWS SES 上发送邮件,电子邮件未验证

Unable to send mail on AWS SES, email not verified

我正在尝试在 AWS SES 上发送电子邮件。我正在使用 Laravel 来做到这一点,使用内置的 Mail 方法。

AWS 给我错误:

Error executing "SendRawEmail" on "https://email.eu-west-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://email.eu-west-1.amazonaws.com` resulted i ▶
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">\n
  <Error>\n
    <Type>Sender</Type>\n
    <Code>MessageReje (truncated...)\n
 MessageRejected (client): Email address is not verified. The following identities failed the check in region EU-WEST-1: example1@gmail.com - <ErrorResponse x ▶
  <Error>\n
    <Type>Sender</Type>\n
    <Code>MessageRejected</Code>\n
    <Message>Email address is not verified. The following identities failed the check in region EU-WEST-1: mgriffiths@gmail.com</Message>\n
  </Error>\n
  <RequestId>645a3241-342f-11e8-8a1c-7ffffe0019e2</RequestId>\n
</ErrorResponse>\n

我理解错误。我还没有验证 example1@gmail.com 地址。然而,这是我要发送到的地址。我 SENDING FROM 的地址是 noreply@mydomain.com,IS 在 AWS SES 控制台中验证。

我做错了什么?

我的代码:

Mail::to('example1@gmail.com')->send(new TestMailable());

并且:

public function build()
{
    return $this->view('emails.test_email')
        ->subject('Test Email '. time())
        ->from('noreply@mydomain.com');
}

重申一下,noreply@mydomain.com 已在 AWS 中验证。

您可能正在使用沙盒帐户。在这种情况下,甚至接收器也需要进行验证。

沙盒帐户中的限制适用

  • 您只能将邮件发送到 Amazon SES 邮箱模拟器,并且只能发送到经过验证的电子邮件地址和域

您需要生产帐户才能发送给未经验证的收件人

有关如何获取生产帐户的详细信息,请参阅Moving out of sandbox account