| @@ 44-59 (lines=16) @@ | ||
| 41 | * |
|
| 42 | * @throws InvalidFetchStatusException |
|
| 43 | */ |
|
| 44 | public function fetchStatus() |
|
| 45 | { |
|
| 46 | $result = $this->sesClient->getIdentityVerificationAttributes( |
|
| 47 | [ |
|
| 48 | 'Identities' => [$this->identity->getIdentity()], |
|
| 49 | ] |
|
| 50 | ); |
|
| 51 | ||
| 52 | $status = $result->search("VerificationAttributes.*.VerificationStatus"); |
|
| 53 | ||
| 54 | if (!is_array($status)) { |
|
| 55 | throw new InvalidFetchStatusException("unable to fetch the status. Did you create the identity?"); |
|
| 56 | } |
|
| 57 | ||
| 58 | return current($status); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Fetch the current DKIM status |
|
| @@ 68-83 (lines=16) @@ | ||
| 65 | * |
|
| 66 | * @throws InvalidFetchStatusException |
|
| 67 | */ |
|
| 68 | public function fetchDkimStatus() |
|
| 69 | { |
|
| 70 | $result = $this->sesClient->getIdentityDkimAttributes( |
|
| 71 | [ |
|
| 72 | 'Identities' => [$this->identity->getIdentity()], |
|
| 73 | ] |
|
| 74 | ); |
|
| 75 | ||
| 76 | $status = $result->search("DkimAttributes.*.DkimVerificationStatus"); |
|
| 77 | ||
| 78 | if (!is_array($status)) { |
|
| 79 | throw new InvalidFetchStatusException("unable to fetch the DKIM status. Did you create the identity?"); |
|
| 80 | } |
|
| 81 | ||
| 82 | return current($status); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * Return the DNS records for the DKIM settings |
|