Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS SNS delivered, complaint, and bounce notifications not working #220

Closed
Wyatt-NAT opened this issue Apr 10, 2023 · 4 comments
Closed

Comments

@Wyatt-NAT
Copy link

No description provided.

@jdavidbakr
Copy link
Owner

When creating an issue please provide relevant details.

@jdavidbakr jdavidbakr closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
@Wyatt-NAT
Copy link
Author

Hello @jdavidbakr

Hope you are doing well.

After installation of this package, I got the mail-tracker.php configuration file. I am using AWS SES and SNS to handle the email processes.

In the configuration file you have provided to add the 'sns-topic' => null, in this I have added the topic ARN which is arn:aws:sns:us-east-1:xxxxxxxxxxxx:email-notifications but I am unable to get that notification in the listeners.

Can you please provide more details about the AWS SES and SNS configuration? The sent, viewed and link clicked work well but the delivered, complaint, and bounce notifications not working.

The delivered, complaint, and bounce notifications are working when I have provided the HTTPS URL to the SNS and I am handling it in the laravel controller. In the controller.

e.g.

$data = $request->json()->all();

if ($data['Type'] == 'SubscriptionConfirmation') {
    Log::info('SubscriptionConfirmation');
    file_get_contents($data['SubscribeURL']);
} elseif ($data['Type'] == 'Notification') {
    $message = json_decode($data['Message'], true);
}

Using above code I am able to log the notifications but using the listeners I am unable to log the notifications.

Please guide me about the configuration.

@Wyatt-NAT Wyatt-NAT changed the title Need proper process with AWS SES and SNS document to track the emails using this package AWS SNS delivered, complaint, and bounce notifications not working Apr 13, 2023
@Wyatt-NAT
Copy link
Author

Do I have to add the subscription URL as https://domain.com/email/sns in the AWS SNS Topic? If yes then do I also need to exclude this route from CSRF verification?

@dekts
Copy link

dekts commented Apr 13, 2023

I am also facing the similar issue:

/**
 * Where should the pingback URL route be?
 */
'route' => [
    'prefix' => 'email',
    'middleware' => ['api'],
],

Do I have to change the middleware in this configuration? Is this related to the SNS callback URL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants