terabytesoftw/helper-mailer

Component Mailer User Core

dev-master / 1.0.x-dev 2019-07-30 15:27 UTC

This package is auto-updated.

Last update: 2024-04-29 04:44:21 UTC


README

68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f443954467731463664645075686544635f74704e707454647654672d464e4e706a4c53424e3134583653632d334a44694f7866453637724568344f5a6679676f6e7831744b656932623244454f48444c6a46365433786c38652d726b4545505a6547714c545763535f76326342526c796f3076635a4c44484735697653444749574373656e626f6c3d7732343030

Helper Mailer.

Unstable Version Build Status Build Status Build Status Code Quality Code Intelligence Status Maintainability


DIRECTORY STRUCTURE:

config/             contains application configurations
src/                contains source files
tests/              contains tests codeception for the web application
vendor/             contains dependent 3rd-party packages

REQUIREMENTS:

  • The minimum requirement by this project template that your Web server supports:

INSTALLATION:

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install this extension using the following command composer:

composer require terabytesoftw/helper-mailer '^1.0@dev'

or add composer.json:

"terabytesoftw/helper-mailer":"^1.0@dev"

USAGE:

// config params defaults config/maileruser.php
// note: if you change one of the default values you must execute: composer du, from the command line.

    // config default
    'helper.mailer.usefiletransport' => true,
    'helper.mailer.sender' => 'no-reply@helpermailer.com', // from->email
    'helper.mailer.sender.name' => 'helper mailer example', // from->name
    'helper.mailer.swiftmailer.logging' => false,
    'helper.mailer.viewpath' => '@root/tests/_data/views', // viewPath

// Simple email:

<?php

use terabytesoft\helpers\Mailer;

$mailer = new Mailer();

$this->mailer->sendMessage(
    'test@helpermailer.com', // to->email
    'test mailer user codecept', // subject->email
    // options->email
    [
        'replyTo' => 'replyto@helpermailer.com', // replyTo->email
        'textBody' => 'Plain text content' // bodyContent->email
    ],
);

// Email with views params:

<?php

use terabytesoft\helpers\Mailer;

$mailer = new Mailer();

$this->mailer->sendMessage(
    'test@helpermailer.com', // to->email    
    'test mailer user codecept', // subject->email
    // options->email
    [
        'views' => 'viewtest', // views->email
    ],
    // params->email
    [
        'params' => 'Params text content', // params->email 
    ],
);

RUN TESTS CODECEPTION:

// download all composer dependencies root project
$ composer update --prefer-dist -vvv

// run all tests with code coverage
$ vendor/bin/codecept run --coverage-xml

WEB SERVER SUPPORT:

  • Apache.
  • Nginx.
  • OpenLiteSpeed.

DOCUMENTATION STYLE GUIDE:

Style CI Documentation PSR2.

LICENCE:

License YiiFramework Total Downloads StyleCI