rayhan/ray-mailer

A mailer plugin for CakePHP3 using database driven Layouts and Templates.

Installs: 506

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:cakephp-plugin

v0.1.7-beta 2016-10-10 11:50 UTC

README

Build Status Software License

RayMailer plugin for CakePHP

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require rayhan/ray-mailer

Configuration

Add following line to your app bootstrap.php file.

Plugin::load('RayMailer', ['routes' => true]);

Database

Add database schema from the config/Schema/raymailer.sql file.

Usage

Create Layouts and Templates

Access templates at http://path_to_your_cake_installation/ray-mailer/templates

Create database layout and templates as necessary.

Load mailer class

use RayMailer\Mailer\RayMailer;

Send email

$mailer = new RayMailer();
$result = $mailer->deliver('welcome-email', ['to' => 'example@example.com', 'param1' => 'Value of param1'], ['debug' => false]);