2017 © Pedro Peláez
 

package laravel-mail-logger

Listens to Mail send event, and saves the information to database as backup/log

image

smajohusic/laravel-mail-logger

Listens to Mail send event, and saves the information to database as backup/log

  • Friday, November 10, 2017
  • by smajohusic
  • Repository
  • 1 Watchers
  • 4 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 17 % Grown

The README.md

Laravel Mail Logger

Latest Version on Packagist Software License Build Status Total Downloads, (*1)

Introduction

Mail logger has one purpose, save mail before they are sent from your app. This enables you to have backup of mail and a overview if something goes wrong., (*2)

This package listens to the MessageSending event fired from Mailer. The listener will dispatch a job, then save the needed form information, event, route and recipient to the database., (*3)

This package also supports auto deleting. You can define how long the the app should keep the logs by defining days in the config file., (*4)

Installation

Laravel 5.5 +

  1. composer require smajohusic/laravel-mail-logger, (*5)

  2. Package is automatically discovered and registered via Laravel's automatic service provider registration., (*6)

Laravel 5.4 or earlier

  1. composer require smajohusic/laravel-mail-logger
  2. Add Smajo\MailLogger\MailLogServiceProvider::class to providers in app.php
  3. Execute command: php artisan vendor:publish --provider="Smajo\MailLogger\MailLogServiceProvider"
  4. Run: php artisan migrate to generate the mail-logger table

Requirements

Cron job, (*7)

To enable auto-deleting you will need to set up a cron job that runs, (*8)

php artisan schedule:run, (*9)

Usage

mailLogger.php config

By default the auto-deleting is disabled. To enable it set, (*10)

'enableAutoDeletion' => true,, (*11)

You can set how long the logs should be stored in the database by giving amount in days., (*12)

'keepLogsForDays' => 30,, (*13)

To make it easier to find mails, you can define all "to" fields your app uses in forms. This will then find the user e-mail in the request, and save it as the "sender" field., (*14)

'toEmailAddresses' => [
    'email',
    'e-mail',
    'to',
]

The Versions

10/11 2017

dev-master

9999999-dev

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Smajo Husic

10/11 2017

dev-develop

dev-develop

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Smajo Husic

10/11 2017

1.0.1

1.0.1.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Smajo Husic

10/11 2017

1.0.0

1.0.0.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Smajo Husic

10/11 2017

dev-feature/tests

dev-feature/tests

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Smajo Husic

29/10 2017

0.1.4

0.1.4.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

by Smajo Husic

23/10 2017

0.1.3

0.1.3.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

by Smajo Husic

22/10 2017

0.1.2

0.1.2.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

by Smajo Husic

16/10 2017

0.1.0

0.1.0.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

by Smajo Husic

16/10 2017

0.1.1

0.1.1.0

Listens to Mail send event, and saves the information to database as backup/log

  Sources   Download

MIT

by Smajo Husic