SES Email not verified for “to” field in Laravel

£可爱£侵袭症+ 提交于 2019-12-13 06:48:46

问题


I have:

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');
    });

When sending using AWS SES I get:

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>

My address and domain are verified.

If I do:

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

It works perfectly, but is completely useless.

How do I get this working so I can send email to users who fill out my form?


回答1:


It is complaining your To: email address is not verified. Looks like you are in SES Sandbox mode. Until you change your SES account to production account, you have to verify your Sender email address too.

When you tested both From and To are your email address (which is already verified).

From: 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



来源:https://stackoverflow.com/questions/36247957/ses-email-not-verified-for-to-field-in-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!