Download the PHP package vancil/flint-mail without Composer
On this page you can find all versions of the php package vancil/flint-mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vancil/flint-mail
More information about vancil/flint-mail
Files in vancil/flint-mail
Package flint-mail
Short Description Full-featured mail package for Flint — Mailables, queueing, and HTTP API drivers
License MIT
Informations about the package flint-mail
flint-mail
Full-featured mail package for the Flint framework. Mailable classes, async queueing, CC/BCC/attachments, and six sending drivers — all with zero new dependencies beyond Flint itself.
Installation
Register the package in config/app.php:
Run the installer to publish the config and migration:
Mailable Classes
Create a Mailable with the CLI:
This creates app/Mail/WelcomeEmail.php. Define your email inside build():
Sending
All Builder Methods
Fluent API (without Mailables)
You can also send ad-hoc emails via the injected Mailer:
Queued Mail
When queue() is called, flint-mail:
- Renders the email body immediately
- Persists a
QueuedMailrecord to the database withstatus = pending - Dispatches a
SendMailJobto Flint's queue system
Start the queue worker to process queued mail:
The queued_mails table tracks each email's lifecycle:
| Column | Description |
|---|---|
status |
pending → processing → sent or failed |
attempts |
How many send attempts have been made |
error |
Last error message if failed |
sent_at |
Timestamp when successfully delivered |
Failed jobs are retried up to 3 times (60 second delay between attempts).
Drivers
Set MAIL_DRIVER in .env to choose your sending backend.
Log (default)
Writes emails to storage/logs/mail.log. Use this locally.
SMTP
Raw socket SMTP — works with any SMTP server (Gmail, Mailgun SMTP, SES SMTP, etc.).
Mailgun
Postmark
Amazon SES
SES requests are signed with AWS Signature Version 4, implemented inline with no external SDK.
SendGrid
Configuration
config/mail.php (published by php flint mail:install):
Email Templates
Email HTML bodies can be written as Spark templates:
resources/views/emails/welcome.spark.php:
Then reference it in your Mailable:
Writing a Custom Driver
Implement Vancil\FlintMail\Drivers\DriverInterface:
Register it in FlintMail::register() by extending the package or binding it in your Application::boot().
License
MIT — Vancil