定制 laravelflare/mail-debug 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

laravelflare/mail-debug

Composer 安装命令:

composer require laravelflare/mail-debug

包简介

README 文档

README

This package is designed to help you easily preview and debug emails sent by your Laravel application in the browser. It provides a pop-up email preview on the subsequent page request after an email has been triggered by your application.

It is based off of themsaid's Laravel Mail Preview Driver which is extremely helpful for more persistent logging and previewing (including .eml files).

Example Animation

Latest Stable Version Total Downloads Latest Unstable Version License

Quick Start Guide

Install the package into your project using composer:

    composer require "laravelflare/mail-debug"

Add the Mail Debug Service Provider to your Applications Service Providers list:

    LaravelFlare\MailDebug\MailDebugServiceProvider::class,

Publish the configuration file using:

    php artisan vendor:publish

In your .env file, set your mail driver to debug:

    MAIL_DRIVER=debug

How It Works

By registering your mail driver as debug, when an email is 'sent' Mail Transport stores the contents of the email to the application storage folder. It then sets the filename of the stored email into the Session.

On the next request (page load) the Mail Debug middleware will check the Session to determine if an email is available to be previewed. If it is, it will trigger the email to be displayed in a browser pop up window.

Note: You may need to allow pop-ups in your browser to see the preview emails.

Configuration Options

Path

This is the Mail Preview Storage Path to store mail preview files in. By default this is /storage/email-previews, but you can use whatever you like!

Lifetime

This is the amount of time to store the preview files for (in minutes). By default this is one minute but can be increased if you would like a certain level of persistence.

Improvements Required

  • Implement Tests

  • Currently this only works for the last mail sent in a request. If your request cycle sends several emails, only the final email will be displayed on the subsequent page request pop-up.

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固