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

imp*_*335 0 php amazon-web-services amazon-ses laravel laravel-5

我有:

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');
    });
Run Code Online (Sandbox Code Playgroud)

使用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>
Run Code Online (Sandbox Code Playgroud)

我的地址和域名已经过验证.

如果我做:

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

它完美无缺,但完全没用.

我该如何工作,以便我可以向填写表格的用户发送电子邮件?

hel*_*loV 6

它抱怨你的To: email地址未经核实.看起来你在SES Sandbox模式中.在您将SES帐户更改为production帐户之前,您还必须验证您的Sender电子邮件地址.

当您测试两者From并且To是您的电子邮件地址(已经过验证).

来自:验证Amazon SES中的电子邮件地址

在您的帐户不在Amazon SES沙箱之前,您还必须验证除Amazon SES邮箱模拟器提供的收件人之外的每个收件人的电子邮件地址.有关邮箱模拟器的详细信息,请参阅测试Amazon SES电子邮件发送.有关移出沙箱的更多信息,请参阅移出Amazon SES沙箱.

搬出亚马逊SES沙箱