Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nasirkhan opened this issue Oct 28, 2023 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@nasirkhan
Copy link

Describe the bug

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.

Expected Behavior

Email should be sent.

Current Behavior

Email send failed with the following error

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.

Reproduction Steps

  1. Install Laravel
  2. install > aws/aws-sdk-php
  3. use aws key for ses
  4. try to send an email

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.8

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP8.1 , Windows 11

@nasirkhan nasirkhan added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 28, 2023
@nasirkhan
Copy link
Author

The issue has been resolved. Needed to install a new certificate from https://curl.se/docs/caextract.html and then enable it from the php.ini.

now the email is working as expected.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant