View EmailTaskTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
View gist:36ca060954eda2972167afadc9353494
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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 |
View followups_mail.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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) ?> |
View FollowUpsMailerTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
View AppTodosController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Controller; | |
use Cake\Event\EventInterface; | |
use CakeDC\Todo\Controller\TodosController; | |
/** | |
* Applications Controller |
View EmailLog.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected $_accessible = [ | |
'from' => true, | |
'to' => true, | |
'subject' => true, | |
'template' => true, | |
'content' => true, | |
'result' => true, | |
'vars' => true, | |
'created' => true, | |
'status' => true, |
View applicationsController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
View FollowUpsTable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->hasMany('FollowUpsTodo', [ | |
'foreignKey' => 'foreign_key', | |
'className' => 'CakeDC/Todo.Todos', | |
'conditions' => [ | |
'model' => 'FollowUps', | |
], | |
]); |
View BondsTable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->hasMany('Todos', [ | |
'foreignKey' => 'foreign_key', | |
'className' => 'CakeDC/Todo.Todos', | |
'conditions' => [ | |
'model' => 'Bonds', | |
], | |
]); | |
$this->hasOne('FollowUps', [ | |
'foreignKey' => 'bond_id', | |
'joinType' => 'LEFT', |
View BondsController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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, |
NewerOlder