Пример #1
0
 public function testMain()
 {
     $Postman = \rmrevin\yii\postman\Component::get();
     $this->assertInstanceOf(postman\Component::className(), $Postman);
     $PHPMailer = $Postman->getCloneMailerObject();
     $this->assertInstanceOf('PHPMailer', $PHPMailer);
     $PHPMailer = $Postman->getMailerObject();
     $this->assertInstanceOf('PHPMailer', $PHPMailer);
 }
Пример #2
0
<?php

/**
 * main.php
 * @author Roman Revin http://phptime.ru
 */
return ['id' => 'testapp', 'basePath' => realpath(__DIR__ . '/..'), 'components' => ['db' => ['class' => 'yii\\db\\Connection', 'dsn' => 'mysql:host=localhost;dbname=yii2postman', 'username' => 'root', 'password' => '', 'tablePrefix' => 'yii_'], 'postman' => ['class' => \rmrevin\yii\postman\Component::className(), 'driver' => 'sendmail', 'default_from' => ['no-reply@localhost', 'Mailer'], 'table' => '{{%postman_letter}}', 'view_path' => '/email', 'smtp_config' => ['host' => 'smtp.domain.com', 'port' => 465, 'auth' => true, 'user' => '*****@*****.**', 'password' => 'password', 'secure' => 'ssl', 'debug' => false]]], 'params' => []];