简体   繁体   中英

Laravel 5.1 Mail::queue Amazon SQS error 404

I first encountered with queue services (in that case it Amazon SQS). I configure queue.php and tried to send mail like that:

\Mail::queue('emails.reminder', [], function($message){
    $message->to('xxxxxxx@gmail.com', 'XXX')->subject('XXX');
});

But I have an error:

Error executing "SendMessage" on "https://sqs.eu-central-1.amazonaws.com/EmailQueue"; AWS HTTP error: Client error: `POST https://sqs.eu-central-1.amazonaws.com/EmailQueue` resulted in a `404 Not Found` response:
<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>I (truncated...)
InvalidAddress (client): The address /EmailQueue is not valid for this endpoint. - <?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>InvalidAddress</Code><Message>The address /EmailQueue is not valid for this endpoint.</Message><Detail/></Error><RequestId>72ea954e-eaf4-55b8-96bb-c6499a1e4015</RequestId></ErrorResponse>

Can anyone help me?

Thanks!

I have done very simple mistake - in queue.php in block

'sqs' => ['queue'  => 'https://sqs.eu-central-1.amazonaws.com/XXXXXXX/QueueNAME']

I just wtire Queue name, without full url (But it need full URL like that: https://sqs.eu-central-1.amazonaws.com/XXXXXXX/QueueNAME ).

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM