本文介绍了尝试通过SES发送电子邮件时出现AWS SDK Guzzle错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
遇到奇怪的错误,我不知道如何解决. 这是错误:
Getting a weird error I have no idea how to fix. This is the error:
( ! ) Catchable fatal error: Argument 2 passed to Guzzle\Service\Client::getCommand() must be an array, string given, called in phar://C:/wamp/www/PHPCodeLance/WebTech/Projects/MIB v2/lib/aws/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php on line 93 and defined in phar://C:/wamp/www/PHPCodeLance/WebTech/Projects/MIB v2/lib/aws/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php on line 113 Call Stack # Time Memory Function Location 1 0.0009 676280 {main}( ) ..\test.php:0 2 0.0557 3311632 Aws\Ses\SesClient->send_email( ) ..\test.php:30 3 0.0557 3312128 Aws\Common\Client\AbstractClient->__call( ) ..\test.php:30 4 0.0557 3312208 Guzzle\Service\Client->__call( ) ..(null):103 5 0.0557 3312296 Guzzle\Service\Client->getCommand( ) ..(null):93这是我使用的代码(直接在AWS页面上)
This is the code I used (straight from the AWS page)
$client = SesClient::factory(array( 'key' => '', 'secret' => '', 'region' => 'us-east-1' )); $response = $client->send_email( 'no-reply@amazon', // Source (aka From) array('ToAddresses' => array( // Destination (aka To) 'myemail@hotmail.nl' )), array( // Message (short form) 'Subject.Data' => 'Email Test ' . time(), 'Body.Text.Data' => 'This is a simple test message ' . time() ) ); // Success? var_dump($response->isOK());更新!!:
解决了以上问题,现在我收到了SSL证书问题:
Fixed the issues above, now I got an SSL certificate issue:
Guzzle\Http\Exception\CurlException: [curl] 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed [url] email.us-east-1.amazonaws/ in phar://C:/wamp/www/PHPCodeLance/WebTech/Projects/MIB v2/lib/aws/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php on line 578预先感谢
推荐答案有关第一个(现已解决的问题,如何解决)问题的答案,请参见通过SES发送电子邮件时,AWS SDK的Guzzle错误
For an answer to the first (now supposedly resolved - HOW?) issue, see AWS SDK Guzzle error when sending email with SES
请,如果您有解决问题的方法,尤其是像这样的奥秘方法,请发布该信息以供其他人使用.
Please, if you have a solution to an issue, particularly one as arcane as this, POST IT for others to use.
更多推荐
尝试通过SES发送电子邮件时出现AWS SDK Guzzle错误
发布评论