From 37d42c4fbbc9ec79079dd05d59fc45fb55f0871d Mon Sep 17 00:00:00 2001 From: infiniziconsulting <45553037+infiniziconsulting@users.noreply.github.com> Date: Sat, 11 Jul 2020 04:11:42 +0530 Subject: [PATCH 1/2] Update HandleSesWebhook.php AWS returns in camel case but switch case is using lowercase so converting incoming event in lowercase. AWS was returning Open but we are checking "open" so it was not working. --- src/Listeners/Webhooks/HandleSesWebhook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Listeners/Webhooks/HandleSesWebhook.php b/src/Listeners/Webhooks/HandleSesWebhook.php index 8bb4acd2..12d4dab9 100644 --- a/src/Listeners/Webhooks/HandleSesWebhook.php +++ b/src/Listeners/Webhooks/HandleSesWebhook.php @@ -61,7 +61,7 @@ private function processEmailEvent(array $event): void if (!$eventType || !$messageId) { return; } - + $eventType = strtolower($eventType); // https://docs.aws.amazon.com/ses/latest/DeveloperGuide/event-publishing-retrieving-sns-examples.html#event-publishing-retrieving-sns-open // Bounce, Complaint, Message, Send Email, Reject Event, Open Event, Click Event switch ($eventType) { From d87c876f2d1596936006f765d901cbc9014bd3df Mon Sep 17 00:00:00 2001 From: Will Selby Date: Tue, 14 Jul 2020 11:14:55 +0100 Subject: [PATCH 2/2] Update HandleSesWebhook.php --- src/Listeners/Webhooks/HandleSesWebhook.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Listeners/Webhooks/HandleSesWebhook.php b/src/Listeners/Webhooks/HandleSesWebhook.php index 12d4dab9..b5e2d6cf 100644 --- a/src/Listeners/Webhooks/HandleSesWebhook.php +++ b/src/Listeners/Webhooks/HandleSesWebhook.php @@ -61,7 +61,9 @@ private function processEmailEvent(array $event): void if (!$eventType || !$messageId) { return; } + $eventType = strtolower($eventType); + // https://docs.aws.amazon.com/ses/latest/DeveloperGuide/event-publishing-retrieving-sns-examples.html#event-publishing-retrieving-sns-open // Bounce, Complaint, Message, Send Email, Reject Event, Open Event, Click Event switch ($eventType) {