2017 © Pedro Peláez
 

yii2-extension yii2-mail-templates

Create and Edit mail templates

image

tusharug/yii2-mail-templates

Create and Edit mail templates

  • Wednesday, December 6, 2017
  • by tusharug
  • Repository
  • 0 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 Mail Templates

Create and Edit mail templates, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist tusharug/yii2-mail-templates "*"

or add, (*4)

"tusharug/yii2-mail-templates": "*"

to the require section of your composer.json file., (*5)

Usage

Add mailtemplates to modules in web.php, (*6)

$config['modules']['mailtemplates'] = [
    'class' => 'tusharug\mailtemplates\Template',
];

Create tables by running following migration command, (*7)

php yii migrate --migrationPath=@vendor/tusharug/yii2-mail-templates/migrations/

Send Mail using Template, (*8)

use tusharug\mailtemplates\components\MailTemplateManager;

$data = array(
            'key1'=>'Value1',
            'key2'=>'Value2',
            'key3'=>'Value3',
        );
$template = new MailTemplateManager();
$template->setTemplate('template_code', $data);

Get Subject, (*9)

$template->getSubject();

Get Body, (*10)

$template->getBody();

You should manage access of following links., (*11)

Developer / Admin Link - Will be used to create, update, delete Templates, (*12)

http://www.yourapp.com/index.php?r=mailtemplates

End User Link -Will be used only for editing templates., (*13)

http://www.yourapp.com/index.php?r=mailtemplates/user

The Versions

06/12 2017

dev-master

9999999-dev

Create and Edit mail templates

  Sources   Download

GPL-3.0+

The Requires

 

by Tushar Ugale

extension yii2