Skip to content

Commit

Permalink
cleanup reset of email
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Nov 13, 2014
1 parent f21adec commit 9b8618d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Lib/EmailLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct($config = null) {
}
parent::__construct($config);

$this->resetAndSet();
$this->resetAndSet($config);
}

/**
Expand Down Expand Up @@ -632,15 +632,21 @@ protected function _logEmail($append = null) {
*
* @return void
*/
public function resetAndSet() {
public function resetAndSet($config = null) {
if ($config === null) {
$config = 'default';
}
parent::reset();

$this->_priority = null;
$this->_wrapLength = null;

$this->_log = null;
$this->_error = null;
$this->_debug = null;

$this->_applyConfig($config);

if ($fromEmail = Configure::read('Config.systemEmail')) {
$fromName = Configure::read('Config.systemName');
} else {
Expand Down

0 comments on commit 9b8618d

Please sign in to comment.