https://github.com/dcblogdev/laravel-sent-emails
Store outgoing emails in Laravel
https://github.com/dcblogdev/laravel-sent-emails
Last synced: 10 months ago
JSON representation
Store outgoing emails in Laravel
- Host: GitHub
- URL: https://github.com/dcblogdev/laravel-sent-emails
- Owner: dcblogdev
- License: mit
- Created: 2020-07-12T19:55:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-24T22:12:17.000Z (12 months ago)
- Last Synced: 2025-04-13T04:59:05.208Z (10 months ago)
- Language: PHP
- Homepage:
- Size: 369 KB
- Stars: 252
- Watchers: 8
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
## Community
There is a Discord community. https://discord.gg/VYau8hgwrm For quick help, ask questions in the appropriate channel.
# Record and view all sent emails
[](https://packagist.org/packages/dcblogdev/laravel-sent-emails)
[](https://packagist.org/packages/dcblogdev/laravel-sent-emails)

Watch a video walkthrough https://www.youtube.com/watch?v=Oj_OF5n4l4k&feature=youtu.be

## Installation
> Note version 2+ requires Laravel 9+
You can install the package via composer:
```
composer require dcblogdev/laravel-sent-emails
```
## Migration
You can publish the migration with:
```
php artisan vendor:publish --provider="Dcblogdev\LaravelSentEmails\SentEmailsServiceProvider" --tag="migrations"
```
After the migration has been published you can the tables by running the migration:
```
php artisan migrate
```
## Config
You can publish the config with:
```
php artisan vendor:publish --provider="Dcblogdev\LaravelSentEmails\SentEmailsServiceProvider" --tag="config"
```
After the config has been published you can change the route path for sentemails from /sentemails to anything you like such as /admin/sentemails:
```
'routepath' => 'sentemails'
```
### ENV variables
```php
SENT_EMAILS_ROUTE_PATH=admin/sentemails
SENT_EMAILS_PER_PAGE=10
SENT_EMAILS_STORE_EMAILS=true
SENT_EMAILS_NO_EMAILS_MESSAGE='No emails have been sent'
SENT_EMAILS_COMPRESS_BODY=true
```
## Views
You can publish the view with:
```
php artisan vendor:publish --provider="Dcblogdev\LaravelSentEmails\SentEmailsServiceProvider" --tag="views"
```
The views will be published to resources/views/vendor/sentemails
You can change the views to match your theme if desired.
## Usage
As soon as an email is sent it will be added to a database table and will be viewable in /sentemails.
> Note you have to be logged in to be able to see /sentemails, if you are not logged in when you attempt to see /sentemails you will be redirected to a login route.
### Changelog
Please see [Releases](https://github.com/dcblogdev/laravel-sent-emails/releases) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email dave@dcblog.dev instead of using the issue tracker.
## Credits
- [David Carr](https://github.com/dcblogdev)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.