PHPackages                             luchavez/aws-ses-bounce - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. luchavez/aws-ses-bounce

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

luchavez/aws-ses-bounce
=======================

Blacklisting bounced email addresses on AWS Simple Email Service (SES) for Laravel 8|9|10

1.0.3(2y ago)31.1k1[1 issues](https://github.com/luchavez-technologies/aws-ses-bounce/issues)1MITPHPPHP ^8.0

Since Apr 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/luchavez-technologies/aws-ses-bounce)[ Packagist](https://packagist.org/packages/luchavez/aws-ses-bounce)[ Docs](https://github.com/luchavez-technologies/aws-ses-bounce)[ RSS](/packages/luchavez-aws-ses-bounce/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (6)Versions (6)Used By (1)

AWS SES Bounce for Laravel 8|9|10
=================================

[](#aws-ses-bounce-for-laravel-8910)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0cb6ef07316b322fd6f960691604a5dd5ff568da33ce300a3fb71becd23c3ef9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c7563686176657a2f6177732d7365732d626f756e63652e737667)](https://packagist.org/packages/luchavez/aws-ses-bounce)[![Total Downloads](https://camo.githubusercontent.com/70ed0399a6d73f20c448d49555e6b1af18f17609f9eb461d02367f8d845de28b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c7563686176657a2f6177732d7365732d626f756e63652e737667)](https://packagist.org/packages/luchavez/aws-ses-bounce)[![GitHub Repo stars](https://camo.githubusercontent.com/55b2fd19e919d0d11032b0ae0908421814c97227a567fa96536bffdd1b257f20/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c7563686176657a2d746563686e6f6c6f676965732f6177732d7365732d626f756e6365)](https://github.com/luchavez-technologies/aws-ses-bounce)[![Discord](https://camo.githubusercontent.com/bd46299a29c3cae288e34846117d44d0cb853da2dad0c376fd8bca3fc269f3b6/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f313134333734343631393935363430343239353f636f6c6f723d386339656666266c6162656c3d446973636f7264266c6f676f3d646973636f7264)](https://discord.gg/MBxxAkQAxx)[![Twitter Follow](https://camo.githubusercontent.com/516380eada3f11aaafd758d9d0b03958251eca9097ba558c3ae9ff53ee59820a/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6c7563686176657a74656368)](https://twitter.com/luchaveztech)

Using AWS Simple Email Service (SES) for sending emails and newsletters is very common in Laravel apps nowadays. AWS SES [configurations](https://laravel.com/docs/8.x/mail#ses-driver) for Laravel is easy to follow as well.

The problem now is the maintenance part of sending these emails. Sending emails to unverified addresses can cause `bounces` whereas sending too many emails can cause `complaints`. If these `bounces` and `complaints` are left unchecked, it may cause the reputation of the sender to be damaged.

According to this [documentation](https://docs.aws.amazon.com/ses/latest/dg/monitor-sender-reputation.html), if the bounce or complaint rates are too high, AWS might place the account under review or pause the account's ability to send email.

The aim of this package, `luchavez/aws-ses-bounce`, is to monitor the email `bounces`, `complaints`, and `successful deliveries`. This package records the recipient email addresses and their `bounces`, `complaints`, and `deliveries`.

One cool feature of this package is the `automatic blocking`. When a set amount of `bounces` or `complaints` is reached, the email address causing that will be immediately blocked. Another cool feature would be the automatic removal of blocked email address from `to`, `cc`, and `bcc` recipients during email sending.

Here's the entity relationship diagram (ERD) of this package:

[![AWS SES Bounce ERD](./images/asb-erd.png "AWS SES Bounce ERD")](./images/asb-erd.png)

Want to contribute? Visit [contributing.md](contributing.md) to see a todo list.

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

[](#installation)

Via Composer

```
$ composer require luchavez/aws-ses-bounce:^1.0.0
```

Setting Up
----------

[](#setting-up)

1. Run `php artisan migrate` to create the tables.
2. Add these variables to `.env` file if you want to override the default values of the package's [config](./config/aws-ses-bounce.php).

Variable NameDefault ValueDescription`ASB_API_MIDDLEWARE``[]`This will be used by all API routes within the package except the webhooks.`ASB_EMAIL_TEST_API_ENABLED``true`This route is used for sending test emails.`ASB_DUMP_URL``config('app.url')`This route will be used for dumping data. Useful for debugging.`ASB_DUMP_ENABLED``false`Decides whether the dump data route will be accessible or not.`ASB_VALIDATE_SIGNATURE``false`Decides whether to enforce signed routes.`ASB_MAX_BOUNCE_COUNT``3`Maximum bounce count an email can get before being blocked.`ASB_SOFT_DELETE_NOTIFICATIONS``false`Decides whether to soft-delete SES Feedback Notifications.`ASB_DELIVERIES_MAX_AGE_IN_DAYS``7`Maximum age in days of Delivery Notification.Usage
-----

[](#usage)

### AWS SES Bounce Service

[](#aws-ses-bounce-service)

The package provides a service called [**AwsSesBounce**](src/Services/AwsSesBounce.php) which you can use by calling its [helper functions](helpers/aws-ses-bounce-helper.php):

1. `awsSesBounce()`
2. `aws_ses_bounce()`

Here's the list of its available methods.

Method NameReturn TypeDescription`getBlockedEmails``Collection`gets the list of blocked emails from cache`getApiMiddleware``array`gets the middleware for other API routes`filterBouncedEmails``array`separates rejected email address from accepted ones`isEmailTestApiEnabled``bool`checks if send test email API is enabled`sendTestEmail``void`sends test email to `to`, `cc`, and `bcc` recipients`getMaxBounceCount``int`gets maximum bounce count before automatic block`block``void`blocks an email address manually`unblock``void`unblocks an email address manually`getBounceReasons``Collection`gets list of possible bounce reasons`shouldSoftDeleteNotifications``bool`check whether to soft-delete or force-delete notifications`getDeliveryNotificationMaxAgeInDays``int`get maximum age in days for delivery notifications### GenerateAwsSesBounceSignedURLCommand Artisan Command

[](#generateawssesbouncesignedurlcommand-artisan-command)

To be able to receive AWS SES feedbacks via AWS SNS Topics, you must generate first the endpoints by running:

```
php artisan asb:generate

```

You'll be getting something like this:

[![AWS SES Bounce HTTP Endpoints](./images/asb-http-endpoints.png "AWS SES Bounce HTTP Endpoints")](./images/asb-http-endpoints.png)

Submit these endpoints to assigned DevOps personnel so they can set it up on AWS Console.

### Routes

[](#routes)

[![AWS SES Bounce Route List](./images/asb-routes-list.png "AWS SES Bounce Route List")](./images/asb-routes-list.png)

**Note**: If `APP_ENV` is equal to `production`, `api/aws-ses/test` and `api/aws-ses/dump` routes will be disabled.

Resources
---------

[](#resources)

- [Amazon SNS notification examples for Amazon SES](https://docs.aws.amazon.com/ses/latest/dg/notification-examples.html)
- [Bounce object](https://docs.aws.amazon.com/ses/latest/dg/notification-contents.html#bounce-object)
- [Complaint object](https://docs.aws.amazon.com/ses/latest/dg/notification-contents.html#complaint-object)
- [Delivery object](https://docs.aws.amazon.com/ses/latest/dg/notification-contents.html#delivery-object)

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

To send test emails, you can use the `/api/aws-ses/test` route. Add `to`, `cc`, and `bcc` recipients - can be array or just a single value.

[![AWS SES Bounce Send Test Email](./images/asb-send-test-email.png "AWS SES Bounce Send Test Email")](./images/asb-send-test-email.png)

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [James Carlo Luchavez](https://github.com/luchavez-technologies)
- [All Contributors](../../contributors)

License
-------

[](#license)

Please see the [license file](license.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Total

4

Last Release

932d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9751834583538187236ea6491879aa80263a43dd036aa4e4fd0a71f721a0bed4?d=identicon)[jamescarloluchavez](/maintainers/jamescarloluchavez)

---

Top Contributors

[![luchtech](https://avatars.githubusercontent.com/u/26067874?v=4)](https://github.com/luchtech "luchtech (4 commits)")

---

Tags

laravelAwsSesBounce

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luchavez-aws-ses-bounce/health.svg)

```
[![Health](https://phpackages.com/badges/luchavez-aws-ses-bounce/health.svg)](https://phpackages.com/packages/luchavez-aws-ses-bounce)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42442.0M544](/packages/socialiteproviders-manager)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5682.0M15](/packages/directorytree-ldaprecord-laravel)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
