Skip to content

Instantly share code, notes, and snippets.

public function testGia(){
Configure::write('App.configs.defaultEmailSender', 'bar');
/** @var Quote $quote */
$Quote = TableRegistry::getTableLocator()->get('Quotes');
$sentQuote = $Quote->SentQuotes->newEntity([
'quote_id' => 1,
'is_broken_out' => 1,
'user_id' => 1,
]);
// debug($sentQuote);
'headers' => 'From: sub@wwisinc.com
To: administrator@example.com
Date: Fri, 12 May 2023 15:38:28 +0000
Message-ID: <dc55b700ff764b9796731c449d4320d5@wwis-web>
Subject: Follow up mail for application #300001
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit',
'message' => '
<!DOCTYPE html
<table border="0" cellpadding="0" cellspacing="0" width="75%" align="center">
<tr>
<td>
<p>
</p>
<br/>
<p>
<p>
We are working on your submission
application #<?= h($accountNumber) ?>
<?php
declare(strict_types=1);
namespace App\Test\TestCase\Mailer;
use App\Mailer\FollowUpsMailer;
use App\Utilities\GroupEmailAddress;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\EmailTrait;
use Cake\TestSuite\TestCase;
<?php
declare(strict_types=1);
namespace App\Controller;
use Cake\Event\EventInterface;
use CakeDC\Todo\Controller\TodosController;
/**
* Applications Controller
protected $_accessible = [
'from' => true,
'to' => true,
'subject' => true,
'template' => true,
'content' => true,
'result' => true,
'vars' => true,
'created' => true,
'status' => true,
foreach ($bondTypes as $bondType) {
debug($bondType->bonds);exit();
if($bondType->state_id == StatesTable::COMMON_BOND_AND_INSURANCE){
echo 'aca';
}
$result = [
'id' => Text::uuid(),
'bond_type_id' => $bondType->id,
'state_id' => $bondType->state_id,
'text' => $bondType->display_name_state,
$this->hasMany('FollowUpsTodo', [
'foreignKey' => 'foreign_key',
'className' => 'CakeDC/Todo.Todos',
'conditions' => [
'model' => 'FollowUps',
],
]);
$this->hasMany('Todos', [
'foreignKey' => 'foreign_key',
'className' => 'CakeDC/Todo.Todos',
'conditions' => [
'model' => 'Bonds',
],
]);
$this->hasOne('FollowUps', [
'foreignKey' => 'bond_id',
'joinType' => 'LEFT',
$followUp = $this->Bonds->FollowUps->find()->where(['bond_id' => $bondId])->first();
if ($elemId == 'enableFollowUp') {
if ($followUp) {
$followUp->enabled = !$followUp->enabled;
} else {
$followupData = [
'last_run' => date('Y-m-d H:i:s'),
'email_daily_sent_count' => 0,
'email_monthly_sent_count' => 0,
'enabled' => 1,