1

I'm trying to set up and test Amazon SES on my local. I installed daniel-zahariev/php-aws-ses version. I set up a send.php to test with the following code:

<?php

require_once 'src/SimpleEmailService.php';
require_once 'src/SimpleEmailServiceMessage.php';
require_once 'src/SimpleEmailServiceRequest.php';


$m = new SimpleEmailServiceMessage();
$m->addTo('MYEMAIL@EMAIL.COM');
$m->setFrom('CSMGR@EMAIL.COM');
$m->setSubject('Hello, world!');
$m->setMessageFromString('This is the message body.');

$ses = new SimpleEmailService('MY ACCESS KEY', 'SECRET KEY');
print_r($ses->sendEmail($m));

Whenever I run send.php I receive the error:

SimpleEmailService::sendEmail(): 60 SSL certificate problem: unable to get local issuer certificate in C:\xampp\htdocs\amazonses\src\SimpleEmailService.php on line 392

The email address I'm using are both verified. New to Amazon SES so any help would be greatly appreciated.

dizballanze
  • 1,267
  • 8
  • 18
user3277150
  • 23
  • 1
  • 7
  • The issue is actually an underlaying `cURL` problem within the SES framework. [You can read more about it here](http://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-unable-to-get-local-issuer-certificate) – Ohgodwhy May 25 '16 at 16:11

1 Answers1

0

You need to disable CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER from your curl code. To disable change following code in SimpleEmailServiceRequest.php file getCurlHandler function.

    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
Jainam Shah
  • 201
  • 1
  • 7