【发布时间】:2018-09-09 15:59:25
【问题描述】:
我正在尝试在 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 地址。但是,那是我发送到的地址。我发送自的地址是 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 中验证。
【问题讨论】:
-
该文档没有说我需要验证接收者。如果是这样,它将使 SES 作为一项服务变得毫无用处,因为我必须验证我拥有所有用户的电子邮件地址?
标签: php laravel amazon-web-services amazon-ses