Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
17 | public function onInit($options) { |
||
18 | $options = (object)$options; |
||
19 | $region = isset($options->region) ? $options->region : 'eu-west-1'; |
||
20 | if (empty($options->username) || empty($options->password)) |
||
21 | throw new \Exception("[core.email.ses] You must provide an Amazon SES SMTP username and password", 1); |
||
22 | |||
23 | Smtp::onInit([ |
||
24 | 'host' => "email-smtp.{$region}.amazonaws.com", |
||
25 | 'secure' => true, |
||
26 | 'port' => 465, |
||
27 | 'username' => $options->username, |
||
28 | 'password' => $options->password, |
||
29 | ]); |
||
30 | |||
31 | } |
||
32 | |||
41 |