Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A mail driver to quickly preview mail
| Date | Stars |
|---|---|
| 2026-07-24 | 1289 |
| 2026-07-25 | 1289 |
| 2026-07-28 | 1289 |
| 2026-07-30 | 1289 |
| 2026-08-06 | 1289 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# A mail driver to quickly preview mail
[](https://packagist.org/packages/spatie/laravel-mail-preview)
[](https://github.com/spatie/laravel-mail-preview/actions/workflows/run-tests.yml)
[](LICENSE.md)
[](https://packagist.org/packages/spatie/laravel-mail-preview)
This package can display a small overlay whenever a mail is sent. The overlay contains a link to the mail that was just sent.
<img alt="screenshot" src="https://github.com/spatie/laravel-mail-preview/blob/main/docs/images/overlay.png?raw=true" width="400" />
This can be handy when testing out emails in a local environment.
## Support us
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/laravel-mail-preview.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/laravel-mail-preview)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
## Installation
You can install the package via composer:
```bash
composer require spatie/laravel-mail-preview
```
### Configuring the mail transport
This package contains a mail transport called `preview`. We recommend to only use this transport in non-production environments. To use the `preview` transport, change the `mailers.smtp.transport` to `preview` in your `config/mail.php` file:
```php
// in config/mail.php
'mailers' => [
'smtp' => [
'transport' => 'preview',
// ...
],
// ...
],
```
### Registering the preview middleware route
The package can display a link to sent mails whenever they are sent. To use this feature, you must add the `Spatie\MailPreview\Http\Middleware\AddMailPreviewOverlayToResponse` middleware to the `web` middleware group in your kernel.
```php
// in app/Http/Kernel.php
protected $middlewareGroups = [
'web' => [
// other middleware
\Spatie\MailPreview\Http\Middleware\AddMailPreviewOverlayToResponse::class,
],
// ...
];
```
You must also add the `mailPreview` to your routes file. Typically, the routes file will be located at `routes/web.php`.
```php
// in routes/web.php
Route::mailPreview();
```
This will register a route to display sent mails at `/spatie-mail-preview`. To customize the URL, pass the URL you want to the macro.
```php
Route::mailPreview('custom-url-where-sent-mails-will-be-shown');
```
### Publishing the config file
Optionally, you can publish the config file with:
```bash
php artisan vendor:publish --provider="Spatie\MailPreview\MailPreviewServiceProvider" --tag="mail-preview-config"
```
This is the content of the config file that will be published at `config/mail-preview.php`:
```php
return [
/*
* By default, the overlay will only be shown and mail will only be stored
* when the application is in debug mode.
*/
'enabled' => env('APP_DEBUG', false),
/*
* All mails will be stored in the given directory.
*/
'storage_path' => storage_path('email-previews'),
/*
* This option determines how long generated preview files will be kept.
*/
'maximum_lifetime_in_seconds' => 60,
/*
* When enabled, a link to mail will be added to the response
* every time a maiExcerpt of 10,681 characters
Read on GitHubFreek Van der Herten · @spatie · Belgium
148
Mohamed Said · United Arab Emirates
58
10
Laravel Shift · Laravel Shift
6
5
4
Adriaan Marain · Belgium
4
3
2
2
Alex Vanderbist · @spatie · Belgium
2
2
Rias · @craftcms · Belgium
2
1
1
1
1
1
1
Vincent Klaiber · @doubledip · Sweden
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:aa3a7c67240e8a3c, topic:testing