h4kuna/mail-manager
最新稳定版本:v1.3.0
Composer 安装命令:
composer require h4kuna/mail-manager
包简介
Provide send and development email.
README 文档
README
MailManager
This extension for Nette framework 2.4+. Support testing mails
Installation to project
$ composer require h4kuna/mail-manager
How to use
Add to your file NEON
extensions: mailManagerExtension: h4kuna\MailManager\DI\MailManagerExtension mailManagerExtension: from: default@example.com templateDir: %appDir%/template # home for mail template debugMode: %debugMode% # enable FileMailer whose save email to file tempDir: %tempDir%/mail # where save email to file # optional plainMacro: # where will find email like plain text alternative default: '=file=-plain' assetsDir: # path to assets returnPath: # where back mail whose send non exists mail messageFactory: # prepare for Message instance globalVars: # global variables for all templates foo: bar bar: %variable% # development live: FALSE # how long live email file in temp directory # - FALSE - forever # - '+1 minute' - relative time (default) Support different templates for plain text and for html.
$message = $mailer->createMessage('body', ['foo' => $foo, 'bar' => $bar]); // if you have body.latte (for html) and body-plain.latte (for plain text) in same directory, then is used. And bind variables onetime. $mailer->send($message);
Prepare latte file in $templateDir/test-file.latte
<strong>variable foo has value:</strong> {$foo}
Send mail.
/* @var $mailer h4kuna\MailManager\MailManager */ $message = $mailer->createMessage('test-file', ['foo' => 'bar']) ->addTo('Milan Matejcek <milan.matejcek@gmail.com>'); /* @var $message Nette\Mail\Message */ $message->addBcc('bar@example.com'); // avaible is 'mail' or 'name <mail>' $mailer->send($message); // if anything bad throw exception
Features
- display email as html page
- on development machine default save to file
- autoremove saved email
- if path name containt word plain, than set plain text mail to send
- parse system mail and send, if you haven't installed sendmail on server
h4kuna/mail-manager 适用场景与选型建议
h4kuna/mail-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.77k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 h4kuna/mail-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 h4kuna/mail-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.77k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04