Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nasirkhan's avatar

Request to AWS SES API failed. Reason: Error executing "SendRawEmail" in Laravel 10

I am trying to send emails with AWS SES. I followed the Laravel official doc and configured the application. but when I tried to send an email I got the following error. I was using ses as MAIL_MAILER at this time.

Request to AWS SES API failed. Reason: Error executing "SendRawEmail" on "https://email.ap-south-1.amazonaws.com"; AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://email.ap-south-1.amazonaws.com.

I assigned AmazonSESFullAccess and AmazonSNSFullAccess permissions directly to my IAM user. I was using aws/aws-sdk-php package with my Laravel application but while trying to solve the issue I tried with aws/aws-sdk-php-laravel package too. But the error remains the same.

Then I generated an SMTP access credential and used it for sending emails. This time it worked.

I want to use the SES config for mail sending with Laravel. It would be really helpful if you please help me to find the issue and solve it.

0 likes
1 reply
nasirkhan's avatar
nasirkhan
OP
Best Answer
Level 10

The issue has been resolved. Found the hint from https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/faq.html#what-do-i-do-about-a-curl-ssl-certificate-error

I followed the steps mentioned below. If you try the same approach if your facing the same issue.

  1. Download the latest certificate from https://curl.se/docs/caextract.html
  2. Open the php.ini file and add the following lines. Here C:\wamp64\php\ssl\cacert.pem is the path of the certificate file. I was using wamp if you are using xampp or something similar, this path might be different.
[curl]
curl.cainfo = "C:\wamp64\php\ssl\cacert.pem"

[openssl]
openssl.cafile = "C:\wamp64\php\ssl\cacert.pem"

  1. Restart web server/apache/fpm php service
  2. Test the mail again, it should work perfectly.

Be sure that you are updating the right php.ini.

Please or to participate in this conversation.