PHPackages                             oza75/laravel-ses-complaints - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. oza75/laravel-ses-complaints

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

oza75/laravel-ses-complaints
============================

Laravel SES complaints and bounces manager

v1.0.0(2y ago)2639.2k↓46.3%7MITPHPPHP ^8.0

Since Jun 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/oza75/laravel-ses-complaints)[ Packagist](https://packagist.org/packages/oza75/laravel-ses-complaints)[ Docs](https://github.com/oza75/laravel-ses-complaints)[ RSS](/packages/oza75-laravel-ses-complaints/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

Laravel SES complaints and bounces manager
==========================================

[](#laravel-ses-complaints-and-bounces-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8e6ec1e337931c90782cd726d05696ec47b15eddd0f9f0b24054d55558cac79a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7a6137352f6c61726176656c2d7365732d636f6d706c61696e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oza75/laravel-ses-complaints)[![Total Downloads](https://camo.githubusercontent.com/c1f26cf6cadd9a07b97907e3fd2dee27ddcc81e6a71869b3654f02a67834da04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7a6137352f6c61726176656c2d7365732d636f6d706c61696e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oza75/laravel-ses-complaints)[![GitHub Actions](https://github.com/oza75/laravel-ses-complaints/actions/workflows/main.yml/badge.svg)](https://github.com/oza75/laravel-ses-complaints/actions/workflows/main.yml/badge.svg)

This package listens to AWS SNS notifications and stops sending mail to email addresses that have received a permanent bounced notification or users who have marked an email as spam.

How it works
------------

[](#how-it-works)

This package intercepts each mail sent by your laravel application and check if the receiver has not marked your mail as SPAM or if the user email address received a permanent bounce notification from AWS SNS before. And according to your strategy defined in the [config file](#config-file), it stops the email sending process or sends the email.

Installation
------------

[](#installation)

Before the installation process, please refer to the version mapping table below to ascertain compatibility between `laravel-ses-complaints` package version and your Laravel application:

Package VersionLaravel Versionv1.0.09 &amp; 10v0.0.49v0.0.39v0.0.28Ensure you select the appropriate version that corresponds with your Laravel version to guarantee full functionality and compatibility.

You can install the package via composer:

```
composer require oza75/laravel-ses-complaints
```

### Publish migrations files and config file

[](#publish-migrations-files-and-config-file)

```
php artisan vendor:publish --provider="Oza75\LaravelSesComplaints\LaravelSesComplaintsServiceProvider"
```

### Run migration

[](#run-migration)

```
php artisan migrate
```

This command will create 2 tables in your database. `sns_subscriptions` table for sns subscription confirmation request and `ses_notifications` table to store complaint and bounce notifications received from SNS.

Usage
-----

[](#usage)

### Create SNS topics

[](#create-sns-topics)

Go to your AWS SNS console and create two HTTP/S topic with these endpoints:

-  listen to bounce notifications
-  listen to complaint notifications

These endpoints can be customized in the [config file](#config-file). Note that as soon as you create these endpoints, they will be automatically confirmed. If not, you can use `php artisan aws:sns:subscribe-url` command to print out the `SubscribeURL` required to confirm subscription directly in your aws console. [More details](https://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.confirm.html)

### Create SNS topics

[](#create-sns-topics-1)

Add SNS topics to your SES domain. [More details](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-sns-notifications.html)

Config file
-----------

[](#config-file)

```
