|
|
@@ -1,4 +1,18 @@
|
|
|
<?php
|
|
|
+// Support BC (snake case config)
|
|
|
+if (!Configure::read('Mail.smtp_host')) {
|
|
|
+ Configure::write('Mail.smtpHost', Configure::read('Mail.smtp_host'));
|
|
|
+}
|
|
|
+if (!Configure::read('Mail.smtp_username')) {
|
|
|
+ Configure::write('Mail.smtpUsername', Configure::read('Mail.smtp_username'));
|
|
|
+}
|
|
|
+if (!Configure::read('Mail.smtp_password')) {
|
|
|
+ Configure::write('Mail.smtpPassword', Configure::read('Mail.smtp_password'));
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * BaseEmailConfig for APP/Config/email.php
|
|
|
+ */
|
|
|
class BaseEmailConfig {
|
|
|
|
|
|
public $default = array(
|
|
|
@@ -35,13 +49,13 @@ class BaseEmailConfig {
|
|
|
}
|
|
|
if ($config = Configure::read('Mail')) {
|
|
|
if (!empty($config['smtp_host'])) {
|
|
|
- $this->default['host'] = $config['smtp_host'];
|
|
|
+ $this->default['host'] = $config['smtpHost'];
|
|
|
}
|
|
|
if (!empty($config['smtp_username'])) {
|
|
|
- $this->default['username'] = $config['smtp_username'];
|
|
|
+ $this->default['username'] = $config['smtpUsername'];
|
|
|
}
|
|
|
if (!empty($config['smtp_password'])) {
|
|
|
- $this->default['password'] = $config['smtp_password'];
|
|
|
+ $this->default['password'] = $config['smtpPassword'];
|
|
|
}
|
|
|
}
|
|
|
}
|