2017 © Pedro Peláez
 

yii2-extension yii2-bitcko-mailer

Bitcko Yii2 PHPMailer use to send emails from your project.

image

bitcko/yii2-bitcko-mailer

Bitcko Yii2 PHPMailer use to send emails from your project.

  • Monday, July 9, 2018
  • by bitcko
  • Repository
  • 0 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 Bitcko PHPMailer

Bitcko Yii2 PHPMailer use to send emails from your project., (*1)

Installation

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

Either run, (*3)

php composer.phar require bitcko/yii2-bitcko-mailer:dev-master

or add, (*4)

"bitcko/yii2-bitcko-mailer": "dev-master"

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

Usage

Once the extension is installed, simply use it in your code by :, (*6)

  1. Mailer configuration in config/web.php for basic temp or config/main.php for advanced.
<?php
'components'=> [
    ...
'BitckoMailer'=>[
            'class'=>'bitcko\mailer\BitckoMailer',
            'SMTPDebug'=> 2, // 0 to disable, optional
            'isSMTP'=>true, // default true
            'Host'=>'smtp.gmail.com', //optional
            'SMTPAuth'=>true, //optional
            'Username'=>'you google account username', //optional
            'Password'=>'your google account password', //optional
            'SMTPSecure'=>'tls', //optional, tls or ssl
            'Port'=>587, //optional, smtp server port
            'isHTML'=>true, // default true
        ],
            ...
        ]

  1. Controller example:
<?php

namespace app\controllers;

use Yii;

use yii\web\Controller;

class SiteController extends Controller
{

  public function actionSend()
     {


         $params = [
             'from'=>['address'=>'email address','name'=>'name here'],
             'addresses'=>[
                 ['address'=>'email address','name'=>'name here']
             ],
             'body'=>'email body here',

              //optional              
              'subject'=>'email subject here',
               //optional
              'altBody'=>'email alt body here',
               //optional
              'addReplyTo'=>[
                  ['address'=>'email address','information'=>'info here']
              ],
               //optional
              'cc'=>[
                  'email address'
              ],
               //optional
              'bcc'=>[
                  'email address'
              ],
              //optional
              'attachments'=>[
                 // ['path'=>'','name'=>'']
              ],
         ];

         return Yii::$app->BitckoMailer->mail($params); // return true if mail sent successfully

     }
}


The Versions

09/07 2018

dev-master

9999999-dev

Bitcko Yii2 PHPMailer use to send emails from your project.

  Sources   Download

Apache-2.0

The Requires

 

by Mhmd Backer Shehadi

mail email extension yii2 html mailer phpmailer emails smtp send email yii mailer