Skip to content

motia/laravel-ses-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-ses-manager

Logs AWS Simple Email Service bounces and complaints for Laravel app

Setup

composer require motia/laravel-ses-manager
php artisan migrate
  • Add the routes to your controller and off you go
// api.php
Route::post('/webhooks/ses/bounce', [Motia\LaravelSesManager\Controllers::class, 'bounce']);
Route::post('/webhooks/ses/complaint', [Motia\LaravelSesManager\Controllers::class, 'complaint']);
  • Map the hooks in your SES dashboard to the your application routes.

Usage

Use Motia\LaravelSesManager\Eloquent\BlackListItem is the model for blacklisted emails.

// check if email is blacklisted
$blackListItem = Motia\LaravelSesManager\Eloquent\BlackListItem::query()
  ->whereNotNull('blacklisted_at')
  ->where('email', $email)
  ->first();

// whitelist email while keeping it in the history
$blackListItem->delete();

// remove email and remove it from the history
$blackListItem->forceDelete();

About

Logs SES bounces and complaints for Laravel app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages