Permalink
Browse files

CakeEmail constructor now accepts $config

  • Loading branch information...
1 parent 803cd28 commit 138aae670a63bd50b2e9acba50352908f960bfec @ceeram ceeram committed Aug 17, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Network/Email/CakeEmail.php
@@ -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);
+ }
}
/**

0 comments on commit 138aae6

Please sign in to comment.