groovy/src Groovy Email Template

Groovy Email Template

  1. Installation ---- V1.4
  2. Migrate First
  3. Add Module
  4. Add components
  5. Usage

Groovy Email Template

Installation ---- V1.4

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist groovy/src "dev-master"

or add

"groovy/src": "dev-master"

to the require section of your composer.json file.

Migrate First

php yii migrate --migrationPath=vendor/groovy/src/migrations

Add Module

'email' => [
    'class' => 'vendor\groovy\src\email\Module',
],

Add components

'emailtemplate' => [
    'class' => 'vendor\groovy\src\email\components\EmailsTemplate',
    'allowDelete'=>false,
    'allowInsert'=>true,
    'dummycontent'=> dirname(dirname(__DIR__))."/frontend/web/emailtemplate/dummy.html",
    'icons'=>["update"=>"glyphicon glyphicon-pencil","view"=>"glyphicon glyphicon-eye-open","delete"=>"glyphicon glyphicon-trash"],
    'breadcrumbs'=> dirname(dirname(__DIR__))."/frontend/web/breadcrumbs/breadcrumbs.php",
],

Usage

// Need Email HTML dynamic
$string_array = array(
    '{{Password}}'=>$password,
);
$html = Yii::$app->emailtemplate->replace_string_email($string_array ,"welcome_email"); // $string_array = Array Of String welcome_email = Email Slug

// Need Email HTML Subject
$subject_string_array = array(
     "{{app_name}}"=>Yii::$app->name
);
$subject = Yii::$app->emailtemplate->replace_string_email($subject_string_array ,"welcome_email","subject");// $string_array = Array Of String welcome_mail = Email Slug and subject

1 0
1 follower
555 downloads
Yii Version: 2.0
License: Apache-2.0
Category: Mail
Developed by: agsachdev
Created on: Jul 4, 2019
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions