Php 如何在yii2中使用aws ses sendmail?

Php 如何在yii2中使用aws ses sendmail?,php,yii2,aws-sdk,Php,Yii2,Aws Sdk,执行“发送电子邮件”时出错。cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅) ↵ 原因:GuzzleHttp\Exception\RequestException cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅) 您是否阅读了错误消息中的链接?它没有回答你的问题吗?@JimGarrison嗨jim,我检查了链接,但没有找到任何解决方法。我建议你详细说明你的发现以及你尝试过的其他内容。目前,这个问题被社会人士认为过于宽泛。 <?php namespace

执行“发送电子邮件”时出错。cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅) ↵ 原因:
GuzzleHttp\Exception\RequestException

cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅)


您是否阅读了错误消息中的链接?它没有回答你的问题吗?@JimGarrison嗨jim,我检查了链接,但没有找到任何解决方法。我建议你详细说明你的发现以及你尝试过的其他内容。目前,这个问题被社会人士认为过于宽泛。
<?php
namespace api\models;
require '../../vendor/autoload.php';

use Yii;
use Aws\Ses\SesClient;

class Mail
{
    public function sendSesEmail($to, $subject, $body="", $bodyHtml="")
    {
        try
        {
            $client = SesClient::factory(array(
                'version'     => 'latest',
                'region' => 'us-east-1',
                'credentials' => array(
                    'key'       => '**********',
                    'secret'    => '**********',
                  ),
            ));
            $emailSentId = $client->sendEmail(array(
                // Source is required
                'Source' => 'test@test.com',
                // Destination is required
                'Destination' => array(
                    'ToAddresses' => array($to)
                ),
                // Message is required
                'Message' => array(
                    // Subject is required
                    'Subject' => array(
                        // Data is required
                        'Data' => 'SES Testing',
                        'Charset' => 'UTF-8',
                    ),
                    // Body is required
                    'Body' => array(
                        'Text' => array(
                            // Data is required
                            'Data' => 'My plain text email',
                            'Charset' => 'UTF-8',
                        ),
                        'Html' => array(
                            // Data is required
                            'Data' => '<b>My HTML Email</b>',
                            'Charset' => 'UTF-8',
                        ),
                    ),
                ),
                'ReplyToAddresses' => array( 'replyTo@email.com' ),
                'ReturnPath' => 'bounce@email.com'
            ));
            return $emailSentId;
        }
        catch (SesException $exec) 
        {
            echo $exec->getmessage();
        }

    }
}
?>
Aws\Ses\Exception\SesException