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

时间:2018-03-30 15:46:15

标签: php laravel amazon-web-services amazon-ses

我正在尝试在AWS SES上发送电子邮件。我使用Laravel来做这件事,使用内置的.ToString("d")方法。

AWS正在给我错误:

Mail

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

我做错了什么?

我的代码:

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

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

要重新进行迭代,请在AWS中验证public function build() { return $this->view('emails.test_email') ->subject('Test Email '. time()) ->from('noreply@mydomain.com'); }

1 个答案:

答案 0 :(得分:3)

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

在沙盒帐户中遵循限制申请

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

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

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