Nikul
Nikul

Reputation: 495

Getting error while sending an email with yashop-ses in yii2

I used yashop-ses to send an email with amazon, for that i used this extension https://github.com/ofat/yashop-ses , while using this extension i am getting error like Undefined property: yashop\ses\libs\SimpleEmailServiceRequest::$resource, here is my code

'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();

Can anyone please tell me what is wrong in my code ?

Upvotes: 1

Views: 419

Answers (2)

Volodymyr
Volodymyr

Reputation: 1587

Yii::$app->mailer->getSES()->enableVerifyPeer(false); - this code fixed my issue

Upvotes: 1

Stan
Stan

Reputation: 964

Try to use

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

Upvotes: 0

Related Questions