Download the PHP package dinubo/laravel-mailer without Composer
On this page you can find all versions of the php package dinubo/laravel-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dinubo/laravel-mailer
More information about dinubo/laravel-mailer
Files in dinubo/laravel-mailer
Package laravel-mailer
Short Description Schedule and send segmented Laravel newsletters with per-recipient placeholders, open/click tracking, unsubscribe handling, provider webhooks (Postmark, Resend), and a built-in admin UI.
License MIT
Homepage https://github.com/dinubo/laravel-mailer
Informations about the package laravel-mailer
Mailer
A Laravel newsletter / mailer package: schedule and send segmented newsletters, resolve per-recipient placeholders, track opens and clicks, handle unsubscribes, and process provider webhooks (Postmark, Resend) — with a built-in admin UI.
Installation
Via Composer:
The service provider and the package's migrations are auto-discovered. Run them:
Publish whatever you want to customise:
Usage
Routes
All routes are mounted under the /mailer prefix and named with a mailer.
prefix. The admin UI lives at /mailer/newsletters. Middleware is configurable
per group (user, admin, callback) in config/mailer.php.
| Group | Examples |
|---|---|
| user | mailer.open, mailer.click, mailer.unsubscribe |
| admin | mailer.newsletters.*, mailer.newsletters.statistics.* |
| callback | mailer.callback.postmark, mailer.callback.resend |
The callback (webhook) routes verify the provider signature when the matching
secret is configured (see Webhooks); the mailer.middleware.callback
group is available for any additional middleware.
Recipients
By default newsletters are sent to your application's configured user provider
model (config('auth.providers.users.model')). Override it in config/mailer.php
via recipient_model.
Placeholders, filters & segments (registrar)
Placeholders and filters use closures, so they are registered on the Mailer
class rather than stored in config (this keeps config cacheable). Register them
from a service provider's boot() method:
A Filter may define a query: closure (constrains the recipient query) and/or a
collection: closure (post-filters the resulting collection).
Events & actions
Trigger event-scheduled newsletters from your app, and compute extra per-recipient placeholders at send time:
Actions work similarly (Action::make(...)->execute(...), registered via
Mailer::actions([...])) for placeholders that run logic per recipient.
Admin access
The admin UI (/mailer/newsletters) is gated by the admin middleware group,
which by default only allows the local environment. Authorize real users with
Mailer::auth():
Webhooks
Bounce/complaint webhooks from Postmark and Resend update delivery state. Set the matching secret to enable signature verification (without it, requests are accepted and a warning is logged):
Sending
Newsletters scheduled in the admin UI are dispatched by the scheduler command. Add it to your console schedule:
Change log
Please see the changelog for more information on what has changed recently.
Testing
The package uses orchestra/testbench:
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Dinubo
- All Contributors
License
MIT. Please see the license file for more information.