KoGoro
KoGoro

Reputation: 245

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('[email protected]', '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!

Upvotes: 5

Views: 3179

Answers (1)

KoGoro
KoGoro

Reputation: 245

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.

Upvotes: 7

Related Questions