Amazon SES 403 Forbidden SignatureDoesNotMatch using Laravel 5.3

I am using Laravel 5.3, EC2 and SES to send emails.

config/mail.php

'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),

.env has

MAIL_DRIVER=ses
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
MAIL_PORT=25
MAIL_ENCRYPTION=TLS
SES_KEY='AKIA------DZQ5TYQ'
SES_SECRET=AhN8d----------------ZbBq7TNBmhNnosfYbasg6Q
SES_REGION='us-west-2'

composer.json

"require": {
    "aws/aws-sdk-php": "~3.0", 
}

EC2 is hosted in Mumbai and SES in us-west. I have tried the following : 1) Creating new IAM user and using the new key/secret. 2) Creating root user key/secret. 3) Running NTPDATE command. 4) php artisan cache:clear , config:clear, view:clear, dump-autoload 5) I also used sparkpost in .env and that gives error 403:forbidden too.

I am still seeing the following error :

[2017-05-26 06:02:00] local.ERROR: exception 'Aws\Ses\Exception\SesException' with message 'Error executing "SendRawEmail" on "https://email.us-west-2.amazonaws.com"; AWS HTTP error: Client error: `POST https://email.us-west-2.amazonaws.com` resulted in a `403 Forbidden` response:
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
  <Error>
    <Type>Sender</Type>
    <Code>SignatureDo (truncated...)
 SignatureDoesNotMatch (client): The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

Full error here : https://pastebin.com/KSJinB1E


I am not familiar with Laravel to begin with. However, if you are using SMTP, you need to specify MAIL_USERNAME and MAIL_PASSWORD. Also the driver should be SMTP and not SES since you are using SMTP host of SES.

The documentation link - http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html should provide you with ways to generate SMTP credentials which are different from your AWS IAM credentials.

In short, you are not using SES SDK but SMTP to send emails. So SES_KEY and SES_SECRET won't do.

Amazon SES 403 Forbidden, I am not familiar with Laravel to begin with. However, if you are using SMTP, you need to specify MAIL_USERNAME and MAIL_PASSWORD . Also the driver  Just use the normal mail gem and connect via smtp like you would any other mail host, nothing special needs to be done. On Sep 10, 2013, at 2:00 AM, Johnny Shields notifications@github.com wrote: Would it be possible to modify the aws-ses gem so we use the SMTP credentials rather than the AWS credentials (or give a choice to use one or the


I was using the 'ses' MAIL_DRIVER in laravel too and had the exact same problem as the OP. The issue for me was the IAM user I was using - I used the one that the SES wizard created for me which worked for a while, but then stopped. All I had to do to fix it, was create a new 'Programmatic access' IAM user with the "ses:SendRawEmail" permission and emails started flowing.

SignatureDoesNotMatch · Issue #172 · aws/aws-sdk-php-laravel , Amazon SES 403 Forbidden SignatureDoesNotMatch using Laravel 5.3. Posted by: bassi. Posted on: May 26, 2017 3:50 AM  Problem accessing S3. Status 403, code SignatureDoesNotMatch, message 'SignatureDoesNotMatch' Original xml: Some(SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.AKIAI3DOSLNJC4YGPZSQAWS4-HMAC-SHA256


1) check your server or local machine's "Date & time" up to date or not.

2) check config/mail.php with below

'driver'    => env('MAIL_DRIVER', 'ses'),
'host'      => env('MAIL_HOST'),
'port'      => env('MAIL_PORT', 587),
'encryption'=> env('MAIL_ENCRYPTION', 'tls'),
'username'  => env('MAIL_USERNAME'),
'password'  => env('MAIL_PASSWORD'),
'sendmail'  => '/usr/sbin/sendmail -bs',

3) check your .env file with below

MAIL_DRIVER=ses
MAIL_HOST=email-smtp.us-east-1.amazonaws.com
MAIL_PORT=587
MAIL_USERNAME=[your AMI KEY]
MAIL_PASSWORD=[your AMI SECRET]
MAIL_ENCRYPTION=tls

4) check your Config/Services.php file with below

'ses' => [
    'key' => env('MAIL_USERNAME'),
    'secret' => env('MAIL_PASSWORD'),
    'region' => 'us-east-1',// change to your AWS region
],

Don't use amazon ses smtp credentials as MAIL_USERNAME & MAIL_PASSWORD

AWS SQS error : SignatureDoesNotMatch HTTP error: 403 · Issue , I am using Laravel 5.3, EC2 and SES to send emails. .env has. MAIL_DRIVER=​ses MAIL_HOST=email-smtp.us-west-2.amazonaws.com  Credentials to access Amazon S3. Review the credentials that your users have configured to access Amazon S3. AWS SDKs and the AWS CLI must be configured to use the credentials of the IAM user or role with access to your bucket. For the AWS CLI, run this command to check the configured credentials:


You don't need SMTP username/password, just using IAM key and secret should get u login SES in Laravel...

You seems put necessary quotation marks in key and region, they should be:

SES_KEY=AKIA------DZQ5TYQ
SES_SECRET=AhN8d----------------ZbBq7TNBmhNnosfYbasg6Q
SES_REGION=us-west-2

If that's not the case, make sure your IAM user has SES write permission:

Amazon SES 403 Interdit SignatureDoesNotMatch utilisant Laravel 5.3, I am using Laravel 5.3, EC2 and SES to send emails. config/mail.php 'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST',  403 Forbidden: Client: AllAccessDisabled: All access to this Amazon S3 resource has been disabled. Please contact AWS Support for further assistance, see Contact Us. 403 Forbidden: Client: AmbiguousGrantByEmailAddress


AWS S3 Version of Laravel (php artisan --version)? error: Client error: PUT https://s3.amazonaws.com/bucket/filename resulted in a 403 Forbidden response​: After you've signed up for Amazon SES, you'll need to obtain your AWS access keys if you want to access Amazon SES through the Amazon SES API, whether by the Query (HTTPS) interface directly or indirectly through an AWS SDK, the AWS Command Line Interface, or the AWS Tools for Windows PowerShell.


Check your AWS Secret Access Key and signing method. Consult the service documentation for details. The Canonical String for this request  Laravel provides a powerful filesystem abstraction thanks to the wonderful Flysystem PHP package by Frank de Jonge. The Laravel Flysystem integration provides simple to use drivers for working with local filesystems and Amazon S3. Even better, it's amazingly simple to switch between these storage options as the API remains the same for each system.


Je ne suis pas au courant de Laravel pour commencer. Toutefois, si vous utilisez SMTP, vous devez spécifier MAIL_USERNAME et MAIL_PASSWORD . Note Amazon SES has endpoints in multiple AWS regions, and email address verification status is separate for each AWS region. You must complete the verification process for each sender in the AWS region(s) you want to use.