CakeEmail constructor now accepts $config

This commit is contained in:
Ceeram 2011-08-17 23:15:57 +02:00
parent 803cd287c2
commit 138aae670a

View file

@ -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);
}
}
/**