Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php AWS SES异常处理程序-异常太多-错误太长_Php_Amazon Web Services_Exception Handling_Amazon Ses - Fatal编程技术网

Php AWS SES异常处理程序-异常太多-错误太长

Php AWS SES异常处理程序-异常太多-错误太长,php,amazon-web-services,exception-handling,amazon-ses,Php,Amazon Web Services,Exception Handling,Amazon Ses,我使用亚马逊SES发送电子邮件,我的最终发送代码是 try { $result = $sesClient->sendEmail($email); $messageId = $result->get('MessageId'); $result['success'] = $message

我使用亚马逊SES发送电子邮件,我的最终发送代码是

try {
                         $result = $sesClient->sendEmail($email);                           
                         $messageId = $result->get('MessageId');
                         $result['success'] = $messageId;
                    } catch (Aws\Ses\Exception\SesException $e) {           

                        $result['error'] = $e;
                    }   
在查询循环结束时,我希望收集所有错误并通过电子邮件发送,但问题是只有一个错误大约有7000个字符,这是因为如果我捕获Exception或Aws\Ses\Exception\SESESEException,我还从GuzzleHttp\Exception\RequestException:“GuzzleHttp\Exception\ClientException”和许多其他我并不真正需要的信息中获得信息。是否有任何方法可以限制带有主要错误消息的消息,在我的情况下,该消息使用的是未附加@domain.com的电子邮件

} catch (Aws\Ses\Exception\SesException $e) {           

                        $result['error'] = $e->getMessage();
    }