New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

laravolt/mailkeeper

Save mail to database for further use
4,947 1
Install
composer require laravolt/mailkeeper
Latest Version:v4.0.2
PHP:>=7.3
Laravel:6
Older releases:5
License:MIT
Last Updated:Feb 21, 2020
Links: GitHub  ·  Packagist
Maintainer: uyab

laravolt/mailkeeper

Save mail to database for further use

Usage

Install Package

composer require laravolt/mailkeeper

Configuration

Enable or disable mailkeeper via environment variable:

MAILKEEPER_ENABLED=false

Other configuration can be read at config/laravolt/mailkeeper.php:

<?php

return [
    // Enable/disable mailkeeper.
    // If enable, every outgoing mail will be intercepted.
    // So, instead of send it via SMTP or other mail driver, mailkeeper will store it to database for further use.
    'enabled' => env('MAILKEEPER_ENABLED', false),
    
    // How many rows to take for each "laravolt:send-mail" command
    'take'    => 100,
];

Save Mail to Database

Any existing code to send email, as documented in https://laravel.com/docs/5.7/mail will just works fine. You don't need to change anything. Mailkeeper will intercepted outgoing mail automatically and store it to database.

Send Mail

Via Command

php artisan laravolt:send-mail

Via Scheduler

Prepare task scheduler, as documented in https://laravel.com/docs/5.7/scheduling.

Register laravolt:send-mail schedule:

$schedule->command(\Laravolt\Mailkeeper\SendMailCommand::class)->everyMinute();

Reference

This package was built based on following tutorial https://www.sitepoint.com/mail-logging-in-laravel-5-3-extending-the-mail-driver/

Related Packages

sendkit/sendkit-laravel

SendKit integration for Laravel

11,997 6
felrov/laravel-mandrill

Laravel Mandrill Mail Transport

5,551 0
harlan-zw/laravel-modern-mail

Extends the Laravel mail experience.

5,398 3
bpedroza/laravel-mail-assertions

Make assertions on mail in laravel.

4,257 3
rulr/laravel-mailpot

A local mail inbox for Laravel

3,358 16

Version History

Version Released PHP Laravel License
v4.0.2 >=7.3 ^6.0 MIT
v4.0.1 >=7.3 ^6.0 MIT
0.10 ^7.1.3 ~5.4|^6.0 MIT
0.9 ^7.1.3 ~5.4 MIT
0.8 ^7.1.3 ~5.4 MIT