Tsugi

Ses extends Controller
in package

Amazon SES → SNS webhook for bounce/complaint events.

Table of Contents

Constants

ROUTE  : mixed = '/ses'

Methods

postSns()  : mixed
Handle SNS subscription confirmations and SES event notifications.
routes()  : mixed
extractMailType()  : string|null
fetchSigningCert()  : string|null
isAllowedSigningCertUrl()  : bool
isAllowedSubscribeUrl()  : bool
processSesEvent()  : void
recordOne()  : void
textResponse()  : Response
trimPayloadJson()  : string|null
verifySnsSignature()  : bool
Verify an SNS message signature (matches aws-php-sns-message-validator).

Constants

ROUTE

public mixed ROUTE = '/ses'

Methods

postSns()

Handle SNS subscription confirmations and SES event notifications.

public static postSns(Application $app) : mixed
Parameters
$app : Application

routes()

public static routes(Application $app[, mixed $prefix = self::ROUTE ]) : mixed
Parameters
$app : Application
$prefix : mixed = self::ROUTE

extractMailType()

private static extractMailType(array<string|int, mixed> $mail) : string|null
Parameters
$mail : array<string|int, mixed>
Return values
string|null

fetchSigningCert()

private static fetchSigningCert(string $url) : string|null
Parameters
$url : string
Return values
string|null

isAllowedSigningCertUrl()

private static isAllowedSigningCertUrl(string $url) : bool
Parameters
$url : string
Return values
bool

isAllowedSubscribeUrl()

private static isAllowedSubscribeUrl(string $url) : bool
Parameters
$url : string
Return values
bool

processSesEvent()

private static processSesEvent(array<string|int, mixed> $event, string|null $sns_message_id) : void
Parameters
$event : array<string|int, mixed>
$sns_message_id : string|null

recordOne()

private static recordOne(string|null $sns_message_id, string|null $ses_message_id, string $event_type, string|null $event_subtype, string|null $email, string|null $mail_type, string $action, string|null $detail, string|null $payload_json) : void
Parameters
$sns_message_id : string|null
$ses_message_id : string|null
$event_type : string
$event_subtype : string|null
$email : string|null
$mail_type : string|null
$action : string
$detail : string|null
$payload_json : string|null

textResponse()

private static textResponse(string $body, int $status) : Response
Parameters
$body : string
$status : int
Return values
Response

trimPayloadJson()

private static trimPayloadJson(array<string|int, mixed> $event) : string|null
Parameters
$event : array<string|int, mixed>
Return values
string|null

        
On this page

Search results