leedohyung-dba / ses-topic-sniffer
A PHP library for catch detail information to SES topic.
Installs: 3 582
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:php-library
Requires
- php: >=5.5.9
README
설치
사용예
use example
use SesTopicSniffer\SesTopicSniffer; $this->SesTopicSniffer = SesTopicSniffer::getInstance($snsRequestData->Message); if (empty($this->SesTopicSniffer)) { return; } if ($this->SesTopicSniffer->isNotFactOrEqualSesStd()) { $this->sesStdStatusCtlHandler(); } else { $this->realStatusCtlHandler(); }
// get info the ses standard status $this->SesTopicSniffer->sesStdStatus // get info the real status $this->SesTopicSniffer->realStatus
// messageId $this->SesTopicSniffer->mail->messageId // email address $this->SesTopicSniffer->mail->destination[0]
SesTopicSniffer::UNDEFINED_BOUNCE_STATUS_CODE SesTopicSniffer::SOFT_BOUNCE_STATUS_CODE SesTopicSniffer::HARD_BOUNCE_STATUS_CODE SesTopicSniffer::COMPLAINT_STATUS_CODE SesTopicSniffer::SOFT_COMPLAINT_STATUS_CODE SesTopicSniffer::HARD_COMPLAINT_STATUS_CODE SesTopicSniffer::DELIVERY_STATUS_CODE
example result
// $this->SesTopicSniffer->mail
(
[timestamp] => 2017-08-08T12:07:11.000Z
[source] => =?utf-8?B?c2lnZnk=?= <sender@sigfy.jp>
[sourceArn] => arn:aws:ses:us-west-2:278359588002:identity/sigfy.jp
[sourceIp] => 54.64.122.239
[sendingAccountId] => 278359588002
[messageId] => 0101015dc1bdd93f-f7b8d7ab-681d-4954-a8c2-7272673180cd-000000
[destination] => Array
(
[0] => lee_hoge_yayaya@fusic.co.jp
)
)
// $this->SesTopicSniffer->realStatus
(
[status] => Array
(
[420] => HardBounce
[510] => SoftComplaint
[520] => HardComplaint
)
[detail] => Matching states are duplicated. In conclusion, it becomes Undefined.
)
// $this->SesTopicSniffer->sesStdStatus
(
[status_code] => 420
[status_name] => HardBounce
[status_sub_code] => 421
[status_sub_name] => General
[detail] => Amazon SES received a general hard bounce and recommends that you remove the recipient's email address from your mailing list.
)
// $this->SesTopicSniffer->topicMsg
(
[notificationType] => Bounce
[bounceType] => Permanent
[bounceSubType] => General
[bouncedRecipientsStatus] => Array
(
[0] => Array
(
[action] => failed
[status] => 5.1.1
)
)
)