yiimodules/yii2-newsletter

此包已被废弃且不再维护。未建议替代包。

完整的新闻简报管理系统

安装: 138

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 1

开放问题: 3

类型:yii2-extension

1.0.0 2016-10-23 15:45 UTC

This package is not auto-updated.

Last update: 2018-08-13 20:25:53 UTC


README

基于 Yii2 的 Web 应用程序的完整新闻简报管理模块,准备集成

  • 易于安装
  • 创建无限量新闻简报
  • 支持 HTML 的电子邮件内容

1. 下载

使用 composer 安装 yii2-newsletter。运行以下命令下载并安装 yii2-newsletter

composer require "yiimodules/yii2-newsletter:dev-master"

2. 配置

将以下行添加到主配置文件中,以便通过 Web URL 访问此模块

'modules' => [
	'newsletter' => [
		'class' => 'yiimodules\newsletter\Module',
	],
],

配置文本编辑模块

'modules' => [
	'redactor' => 'yii\redactor\RedactorModule',
],

3. 更新数据库架构

最后,您需要通过应用迁移来更新您的数据库架构。请确保您已正确配置 db 应用程序组件,并运行以下命令

$ php yii migrate/up --migrationPath=@vendor/yiimodules/yii2-newsletter/migrations

运行模块?

$ https:///YOUR-PROJECT-NAME/web/index.php?r=newsletter

向创建的活动添加条目

// To Insert contact in newsletter campaign
$contact = array(
	'userId'		=> $user->id,
	'email'			=> $user->email,
	'mobile'		=> $user->profile->mobile
);
$campaignId 	= 	$campaignId;
Yii::$app->getModule('newsletter')->addContact($campaignId,$contact))