I am using PHP to send emails via Amazon SES. I am calling the API repeatedly in order to send around 1000 personalised emails. However, after every 25 calls to the API I receive the following error:
Fatal error: Uncaught exception 'Aws\Ses\Exception\SesException' with message 'Error executing "SendEmail" on "https://email.eu-west-1.amazonaws.com"; AWS HTTP error: cURL error 77: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 77: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in phar:///home/robcowen/public_html/scripts/aws.phar/GuzzleHttp/Handler/CurlFactory.php:187 Stack trace: #0 phar:///home/robcowen/public_html/scripts/aws.phar/GuzzleHttp/Handler/CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 phar:///home/robcowen/public_html/scripts/aws.phar/GuzzleHttp/Handler/CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handl in phar:///home/robcowen/public_html/scripts/aws.phar/Aws/WrappedHttpHandler.php on line 159
I can't find any reference in the documentation to a limit. I have tried to delay my loop by either sleep(30) after each block of 20 API calls, or sleep(1) after each call. Neither works.
Does anybody have any ideas, please?