PHPackages                             vikramsra/email-log-to-db - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. vikramsra/email-log-to-db

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

vikramsra/email-log-to-db
=========================

A plugin to log emails to the database in Laravel.

1.0.1(1y ago)010MITBladePHP ^8.2

Since Oct 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vikramsra/email-log-to-db)[ Packagist](https://packagist.org/packages/vikramsra/email-log-to-db)[ RSS](/packages/vikramsra-email-log-to-db/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Email Log to Database - Laravel Plugin
======================================

[](#email-log-to-database---laravel-plugin)

A Laravel plugin to log email information to a database table and provide a user interface for viewing, filtering, and managing email logs. This plugin is intended to help developers keep track of emails sent through their application.

Features
--------

[](#features)

- Log emails sent from your Laravel application.
- View email logs in a Bootstrap-based table.
- Filter logs by recipient, subject, or sent date.
- Real-time filtering using AJAX.
- View detailed information in a modal pop-up.
- Easily override the default views without publishing.

Installation
------------

[](#installation)

### Step 1: Install the Package

[](#step-1-install-the-package)

Clone or install this package into your `plugins` directory. Alternatively, you can add it to your `composer.json` as a local package:

```
composer require vikramsra/email-log-to-db
```

### Step 2: Add Service Provider

[](#step-2-add-service-provider)

Add the `EmailLogServiceProvider` to your `bootstrap/providers.php` file or in your `composer.json` to automatically register the provider:

**Register in `bootstrap/providers.php`**

```
'providers' => [
    // Other service providers...
    Vikramsra\EmailLogToDb\EmailLogServiceProvider::class,
],
```

### Step 3: Run Migrations

[](#step-3-run-migrations)

This package includes a migration to create the `email_logs` table. Run the migration using:

```
php artisan migrate
```

Usage
-----

[](#usage)

### Step 1: Log Emails

[](#step-1-log-emails)

The package will automatically log emails sent from your Laravel application. No further configuration is needed.

### Step 2: View Email Logs

[](#step-2-view-email-logs)

You can access the email logs in your Laravel application by visiting `/email-logs`.

The logs are presented in a user-friendly table with the following features:

- **Real-Time Search**: Filter by recipient or subject in real-time.
- **Date Filter**: Filter by sent date.
- **View Details**: Click on the "View Details" button to see the full email body and attachments in a modal pop-up.

### Step 3: Overriding Views

[](#step-3-overriding-views)

If you need to customize the views, simply create corresponding Blade files in your main Laravel application at `resources/views/vendor/emailLogs/`.

For example:

- To override the email log listing page, create `resources/views/vendor/emailLogs/index.blade.php`.
- To override the details modal, create `resources/views/vendor/emailLogs/show.blade.php`.

Laravel will automatically prioritize these views over the package-provided ones.

Available Routes
----------------

[](#available-routes)

- **GET /email-logs**: View and filter the list of email logs.
- **GET /email-logs/{id}**: View details for a specific email log.

Customization
-------------

[](#customization)

### Overriding the Default Views

[](#overriding-the-default-views)

The package provides a default UI to manage the email logs. If you want to modify the views to fit your application's style, you can override them without publishing:

- Create Blade files in `resources/views/vendor/emailLogs/` to override the default views.
- The default views will be used if no overriding views are found.

Requirements
------------

[](#requirements)

- Laravel 11+.
- PHP 8.2 or newer.

Contributing
------------

[](#contributing)

If you would like to contribute, please open a pull request or an issue in the repository. Contributions are always welcome!

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

567d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2487df0c8eee3ef90a40fa6c0e1248c6fd6d0da0c20eb8625d0701d5739e605?d=identicon)[vikramsra](/maintainers/vikramsra)

---

Top Contributors

[![vikramsra](https://avatars.githubusercontent.com/u/1715752?v=4)](https://github.com/vikramsra "vikramsra (2 commits)")[![hmimeee](https://avatars.githubusercontent.com/u/63141574?v=4)](https://github.com/hmimeee "hmimeee (1 commits)")

### Embed Badge

![Health badge](/badges/vikramsra-email-log-to-db/health.svg)

```
[![Health](https://phpackages.com/badges/vikramsra-email-log-to-db/health.svg)](https://phpackages.com/packages/vikramsra-email-log-to-db)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
