| Total Complexity | 3 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class AmazonSesWrapper extends PHPMailerWrapper |
||
| 12 | { |
||
| 13 | |||
| 14 | 1 | public static function schema() |
|
| 15 | { |
||
| 16 | 1 | return ['ses']; |
|
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return SesClient |
||
| 21 | */ |
||
| 22 | 1 | public function getSesClient() |
|
| 23 | { |
||
| 24 | //Send the message (which must be base 64 encoded): |
||
| 25 | 1 | return new SesClient([ |
|
| 26 | 1 | 'credentials' => new Credentials( |
|
| 27 | 1 | $this->uri->getUsername(), |
|
| 28 | 1 | $this->uri->getPassword() |
|
| 29 | 1 | ), |
|
| 30 | 1 | 'region' => $this->uri->getHost(), |
|
| 31 | 1 | 'version' => '2010-12-01' |
|
| 32 | 1 | ]); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * ses://accessid:aswsecret@region |
||
| 37 | * |
||
| 38 | * @param Envelope $envelope |
||
| 39 | * @return bool |
||
| 40 | * @throws InvalidEMailException |
||
| 41 | * @throws InvalidMessageFormatException |
||
| 42 | * @throws \PHPMailer\PHPMailer\Exception |
||
| 43 | */ |
||
| 44 | 4 | public function send(Envelope $envelope) |
|
| 64 | } |
||
| 65 | } |
||
| 66 |