thienhungho / yii2-mail
Yii2 邮件系统
v1.0.3
2018-12-25 10:23 UTC
Requires
- thienhungho/yii2-app-core: *
- yiisoft/yii2: ~2.0.9
This package is auto-updated.
Last update: 2024-09-25 20:41:18 UTC
README
Yii2 邮件系统
安装
安装此扩展的首选方法是使用 composer。
运行以下命令:
php composer.phar require --prefer-dist thienhungho/yii2-mail "*"
或者在您的 composer.json
文件的 require 部分添加:
"thienhungho/yii2-mail": "*"
到您的 composer.json
文件的要求部分。
迁移
在终端中运行以下命令进行数据库迁移
yii migrate/up --migrationPath=@vendor/thienhungho/Mail/migrations
或者使用命名空间迁移(需要至少 Yii 2.0.10)
// Add namespace to console config: 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationNamespaces' => [ 'thienhungho\Mail\migrations\namespaced', ], ], ],
然后运行:
yii migrate/up
配置
将 MailTransportManage 模块添加到您的 AppConfig
文件中。
... 'modules' => [ ... /** * Mail Transport Manage */ 'mail-transport-manage' => [ 'class' => 'thienhungho\Mail\modules\MailTransportManage\MailTransportManageModules', ], ... ], ...