laravolt/mailkeeper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laravolt/mailkeeper

最新稳定版本:v4.0.2

Composer 安装命令:

composer require laravolt/mailkeeper

包简介

Save mail to database for further use

README 文档

README

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/

统计信息

  • 总下载量: 4.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-19