Skip to content

Commit

Permalink
Update initializing of AWS client
Browse files Browse the repository at this point in the history
Since current AWS client library versions (AWR-3.15.9 now) client factory needs to be called with different parameters.
  • Loading branch information
hangya committed Mar 11, 2016
1 parent 59120c0 commit 8659d16
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions qa-send-mail-overrides.php
Expand Up @@ -12,9 +12,12 @@ function qa_send_email($params)
include QA_INCLUDE_DIR.'vendor/aws.phar';

$client = Aws\Ses\SesClient::factory(array(
'version' => 'latest',
'region' => (string)qa_opt('plugin_mail_ses_region'),
'secret' => (string)qa_opt('plugin_mail_ses_secret'),
'key' => (string)qa_opt('plugin_mail_ses_key'),
'credentials' => array(
'secret' => (string)qa_opt('plugin_mail_ses_secret'),
'key' => (string)qa_opt('plugin_mail_ses_key'),
)
));
$param = array();
$param['Source'] = '=?utf-8?B?' . base64_encode($params['fromname']) . '?= <' . $params['fromemail'] . '>';
Expand All @@ -37,6 +40,7 @@ function qa_send_email($params)
);
try {
$result = $client->sendEmail($param);
return $result;
}
catch(Exception $e) {

Expand Down

0 comments on commit 8659d16

Please sign in to comment.