Laravel 中的 "to" 字段未验证 SES 电子邮件

SES Email not verified for "to" field in Laravel

我有:

Mail::send('emails.booking-confirmation', [
        'name' => $name,
        'email' => $email,
        'tel' => $tel,
        'msg' => $msg,
        'date' => Carbon::parse($date)->format('l, jS \o\f F, Y \a\t H:ia'),
        'service' => $q->service,
        'duration' => $q->duration . ' minutes'
    ], function ($m) use ($name, $email) {
        $m->from('myemail@ddress.co.uk', 'Subject');
        $m->to($email, $name)->subject('Your Booking');
    });

使用 AWS SES 发送时我得到:

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 in a `400 Bad Request` response:
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<Error>
<Type>Sender</Type>
<Code>MessageReje (truncated...)
MessageRejected (client): Email address is not verified. - <ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<Error>
<Type>Sender</Type>
<Code>MessageRejected</Code>
<Message>Email address is not verified.</Message>
</Error>
<RequestId>8551cf11-f420-11e5-b4ac-bf30e6ff71ee</RequestId>
</ErrorResponse>

我的地址和域已验证。

如果我这样做:

...
], function ($m) use ($name, $email) {
        $m->from('myemail@ddress.co.uk', 'Subject');
        $m->to('myemail@ddress.co.uk', $name)->subject('Your Booking');
    });

它运行完美,但完全没用。

如何使它正常工作,以便我可以向填写我的表单的用户发送电子邮件?

它抱怨您的 To: email 地址未验证。您似乎处于 SES Sandbox 模式。在将您的 SES 帐户更改为 production 帐户之前,您还必须验证您的 Sender 电子邮件地址。

当您测试时,FromTo 都是您的电子邮件地址(已验证)。

发件人:Verifying Email Addresses in Amazon SES

Until your account is out of the Amazon SES sandbox, you must also verify the email address of every recipient except for the recipients provided by the Amazon SES mailbox simulator. For more information about the mailbox simulator, see Testing Amazon SES Email Sending. For more information about moving out of the sandbox, see Moving Out of the Amazon SES Sandbox.

Moving Out of the Amazon SES Sandbox