承接 burnthebook/craft-log-mail-adapter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

burnthebook/craft-log-mail-adapter

最新稳定版本:0.0.2

Composer 安装命令:

composer require burnthebook/craft-log-mail-adapter

包简介

Log mail transport adapter for Craft CMS

README 文档

README

This plugin adds a mail transport adapter that logs emails to a file instead of sending them. It is recommended for local development only.

Requirements

  • Craft CMS 5.0.0+
  • PHP 8.2+

Installation

# Go to your Craft project
cd /path/to/project

# Install the plugin
composer require burnthebook/craft-log-mail-adapter

# Enable the plugin
php craft plugin/install log-mail-adapter

Setup

Open Settings → Email and set Transport Type to "Log Adapter". Set the log file path to where you want emails written (default: @storage/logs/mail.log).

Each email is logged as a JSON line entry.

config/app.php snippet

<?php

use Craft;
use craft\helpers\MailerHelper;
use burnthebook\logmail\LogAdapter;

return [
    '*' => [
        'components' => [
            // Live mailer settings if overriden
            // ...
        ]
    ],
    'dev' => [
        'components' => [
            'mailer' => function() {
                // Get the stored email settings
                $settings = craft\helpers\App::mailSettings();

                // Override the transport adapter to Log
                $settings->transportType = \burnthebook\logmail\LogAdapter::class;
                // use default settings from plugin (storage/logs/mail.log)
                $settings->transportSettings = [];

                $config = craft\helpers\App::mailerConfig($settings);
                return Craft::createObject($config);
            }
        ]
    ],
];

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固