Skip to content

Commit

Permalink
CakeEmail constructor now accepts $config
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Aug 17, 2011
1 parent 803cd28 commit 138aae6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cake/Network/Email/CakeEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,17 @@ class CakeEmail {

/**
* Constructor
* @param mixed $config Array of configs, or string to load configs from email.php
*
*/
public function __construct() {
public function __construct($config = null) {
$charset = Configure::read('App.encoding');
if ($charset !== null) {
$this->charset = $charset;
}
if ($config) {
$this->config($config);
}
}

/**
Expand Down

0 comments on commit 138aae6

Please sign in to comment.