mmockelyn/mailocal
Composer 安装命令:
composer create-project mmockelyn/mailocal
包简介
Debug your emails while making sure real customers never see them.
README 文档
README
Mailocal
Safely test sending your emails by using this local SMTP server and viewing the results on the web interface.
By using this locally installed SMTP server you can be sure that your real customers will never see your test emails!
However you can see all of them by simply opening the provided interface in any browser.
Screenshots
Requirements
- php 7.3
- ext-curl (php7.2-curl)
- ext-mbstring (php7.2-mbstring)
- ext-sqlite3 (php7.2-sqlite3)
- ext-xml (php7.2-xml)
- ext-zip (php7.2-zip)
- composer
If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:
curl -s http://getcomposer.org/installer | php
Install
composer create-project jfoucher/mailocal- That's it
Running
cd mailocalto enter the directory just created by composer- Run
bin/mailocalto run both the SMTP server and the web server
Alternatively you can:
- Run
yarn run buildto build the frontend assets php bin/console email:serverto launch the SMTP serverphp bin/console server:startto start Symfony's built-in web server
Configuration
- Configure your other apps to use this new local SMTP server:
- host:
127.0.0.1 - port:
2525(or the one you chose, see below) - You can configure a SMTP username and password by setting the
SMTP_SERVER_USERandSMTP_SERVER_PASSWORDfields in your.envfile. Make sure you update your email client's credentials accordingly.
- host:
- Mailocal uses an SQLite database by default (in
var/data.db) but you can choose to use any other database by setting the correct URL in the.envfile. - By default,
bin/mailocalwill start a web server that listens on 127.0.0.1 (address) and the first free port starting from 8000. This is where you can view any emails you receive. You can forcebin/mailocalto always listen on a specific address/port by setting the value ofWEB_SERVER_ADDRESSPORTin your.envfile. The value can be address:port, address, or port.
Done
You can now view any emails you receive by opening http://127.0.0.1:8000 in your browser
The SMTP runs on port 2525 by default. Pass the --port option to use another one, like this: php bin/console email:server --port=587
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Warning
Never use this in production, only run it on your local machine.
mmockelyn/mailocal 适用场景与选型建议
mmockelyn/mailocal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 11 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mmockelyn/mailocal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mmockelyn/mailocal 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-10
