async-aws/ses
Async AWS SES client for PHP: send emails and use Amazon SES features with non-blocking, PSR-friendly requests. Lightweight alternative to the full AWS SDK, designed for modern apps and easy integration with your existing HTTP client and event loop.
async-aws/ses package provides an asynchronous SES (Simple Email Service) client for PHP/Laravel, ideal for decoupling email sending from synchronous request flows. This aligns well with Laravel’s event-driven architecture (e.g., queues, jobs) and microservices patterns where email delivery should not block user requests.Illuminate\Queue) and job dispatching (dispatch()), enabling async email processing without reinventing the wheel.Mail facade or used standalone via the queue.MailSent, FailedJob) for observability and retries, aligning with Laravel’s error-handling patterns..env) and configurable SES regions, reducing hardcoding risks.Mail::send() calls with async job dispatching (e.g., SendEmailJob::dispatch($mailable)). The package’s AsyncSesClient can be bound to Laravel’s service container.Mail::to()->send() with SendEmailJob::dispatch().AsyncSesClient for SES-specific operations (e.g., template sending).assertQueued()).circuit-breaker package).aws/aws-sdk-php and ext-curl are installed.ses:SendEmail, ses:SendRawEmail, and ses:SendTemplatedEmail permissions.Mailable classes align with SES template variables.php artisan queue:work --daemon).Mail::send() with job dispatching.AsyncSesClient in AppServiceProvider.async-aws/ses for breaking changes (e.g., AWS SDK updates). Use Laravel’s composer.json version constraints.aws/aws-sdk-php to avoid version conflicts. Consider using Laravel’s config/caching for AWS credentials.php artisan queue:failed-table). Log SES-specific errors (e.g., MessageRejected).guzzlehttp/ringphp).SendBulkTemplatedEmail API via custom jobs.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Queue worker crashes | Emails undelivered | Use supervisor/daemon tools; implement health checks. |
| SES throttling | Job timeouts | Add retry logic with jitter; monitor ThrottledExceptions. |
| AWS SES outage | All emails blocked | Implement fallback to another provider (e.g., Mailgun) via feature flag. |
| Database queue corruption | Lost jobs | Migrate to Redis/SQS; enable queue table backups. |
| Job backlog explosion | System slowdown | Set up alerts for queue length; scale workers dynamically. |
Sent, Bounced).SELECT COUNT(*) FROM failed_jobs).X-Processing-Time headers).How can I help you explore Laravel packages today?