定制 agouticreative/laravel-mailcatcher 二次开发

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

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

agouticreative/laravel-mailcatcher

Composer 安装命令:

composer require agouticreative/laravel-mailcatcher

包简介

A service provider for Alexandre Salome's PHP Mailcatcher SDK

README 文档

README

A Laravel service provider that returns the data on a Mailcatcher instance as an Eloquent collection of models.

Most of the heavy lifting is done by Mailcatcher SDK for PHP

Installation

  1. install Mailcatcher.
  2. from the root of your project, run this command: composer install https://github.com/agouticreative/laravel-mailcatcher
  3. Add Agouti\LaravelMailcatcher\ServiceProvider::class to the providers array in config/app.php
  4. Add 'Mailcatcher' => Agouti\LaravelMailcatcher\Facade::class to the aliases array in config/app.php
  5. from the root of your project run this command: php artisan vendor:publish
  6. If your Mailcatcher instance is reached at a port and location combination different from http://localhost:1080/ then change the url propery in config/mailcatcher.php to reflect the correct location

Usage

Use Mailcatcher::search() to search the Mailcatcher instance for messages. Search takes an array of filtering arguments in the manner of the aforementioned Mailcatcher PHP SDK. Refer to that repo's instructions to learn more. A simple Mailcatcher::search() will return all messages on Mailcatcher.

The messages' models will have these attributes:

  • id (integer)
  • sender (array with name and email keys)
  • recipients (array of arrays with name and email keys)
  • subject (string)
  • content (string)
  • url (a URL for viewing the content of the message, like http://localhost:1080/messages/1.html. This is particuarly useful for PHPUnit or Selenium testing.)

Attachments are not yet supported.

The original message object from the SDK is available as the messageObject property on the message model ($collection[0]->messageObject, for example)

Both the model and the collection have a delete method that will delete messages on Mailcatcher. delete on the collection completely clears out mailcatcher! be careful!

This is an alpha release

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固