定制 creagia/laravel-web-mailer 二次开发

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

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

creagia/laravel-web-mailer

最新稳定版本:1.0.4

Composer 安装命令:

composer require creagia/laravel-web-mailer

包简介

Laravel Web Mailer

README 文档

README

This package contains a web mailer which will catch all the sent emails. Then, you can view it visiting the route /web-inbox. The emails will be stored as a file in the storage folder.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Inbox screenshot

Requirements

This package requires PHP 8.1 and Laravel 9. If you need compatibility with older versions, check the alternatives section.

Installation

You can install the package via composer:

composer require creagia/laravel-web-mailer

After that, open your config/mail.php file and add the web mailer entry in the mailers configuration array.

'mailers' => [
    // ...
    'web' => [
        'transport' => 'web',
    ],
],

Finally, you can enable the web mailer setting the defined mailer in your .env file:

MAIL_MAILER=web

We recommend you to publish the configuration file to be able to perform some customizations

php artisan vendor:publish --tag="web-mailer-config"

Inbox URL

The default URL to view the emails is /web-inbox. You can change it, adding the below entry to your .env file:

WEB_MAILER_ROUTE_PREFIX="your-custom-url"

Route protection

By default, the inbox URL is authorized for everybody who has the link. If you need to add some protection, you can modify the middleware array on the config/web-mailer.php file.

Delete all stored emails

php artisan laravel-web-mailer:clear-all

Delete stored emails older than N days

php artisan laravel-web-mailer:cleanup

You can run or schedule the command laravel-web-mailer:cleanup to delete the emails older than N days. By default, it will delete the emails older than 7 days. You can customize the number of days changing the delete_emails_older_than_days parameter on the config/web-mailer.php file.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Alternatives

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 69
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-03