2015-11-09 71 views
0

我用yashop-SES与亚马逊发送电子邮件发送与yashop-SES的电子邮件,为我所用这个扩展 https://github.com/ofat/yashop-ses,而使用这个扩展我收到错误,如Undefined property: yashop\ses\libs\SimpleEmailServiceRequest::$resource,这里是我的代码得到错误而yii2

'mail' => [ 
      'class' => 'yashop\ses\Mailer', 
      'access_key' => '*******', 
      'secret_key' => '*******', 
      'host' => 'us-east-1' 
     ], 

Yii::$app->mail->compose('contact/html') 
    ->setFrom('[email protected]') 
    ->setTo('[email protected]') 
    ->setSubject('Testing') 
    ->send(); 

任何人都可以告诉我我的代码有什么问题吗?

+0

面临着同样的问题..任何人有任何实物比请分享解决方案。 –

回答

0

尝试使用

'host' => 'email.us-east-1.amazonaws.com' 
0

Yii::$app->mailer->getSES()->enableVerifyPeer(false); - 此代码固定我的问题