bitcko/yii2-bitcko-mailer Bitcko Yii2 PHPMailer use to send emails from your project.

Yii2 Bitcko PHPMailer

  1. Installation
  2. Usage

Bitcko Yii2 PHPMailer use to send emails from your project.


The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.


Once the extension is installed, simply use it in your code by :

  1. Mailer configuration in config/web.php for basic temp or config/main.php for advanced.
'components'=> [
            'SMTPDebug'=> 2, // 0 to disable, optional
            'isSMTP'=>true, // default true
            'Host'=>'', //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:

namespace app\controllers;

use Yii;

use yii\web\Controller;

class SiteController extends Controller
  public function actionSend()
         $params = [
             'from'=>['address'=>'email address','name'=>'name here'],
                 ['address'=>'email address','name'=>'name here']
             'body'=>'email body here',
              'subject'=>'email subject here',
              'altBody'=>'email alt body here',
                  ['address'=>'email address','information'=>'info here']
                  'email address'
                  'email address'
                 // ['path'=>'','name'=>'']
         return Yii::$app->BitckoMailer->mail($params); // return true if mail sent successfully

0 0
1 follower
1 330 downloads
Yii Version: 2.0
License: Apache-2.0
Category: Mail
Developed by: Mhmd Backer Shehadi
Created on: Jul 10, 2018
Last updated: 5 years ago
Packagist Profile
Github Repository

Related Extensions