summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-10-29 14:39:55 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-10-29 14:42:42 +0100
commit5b985a997f50e3476a606f40e2ced32b36cbef03 (patch)
tree363ceadb738e4f79ba96788c650d76ce37673177
parent98534e4fa28b27727445f56414718de0a4d99968 (diff)
Make email sender configurable
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--NEWS1
-rw-r--r--application/config/config.php3
-rw-r--r--application/controllers/user.php9
3 files changed, 5 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index d5e8b68c7..9b3efcba7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
This file lists major, incompatible or otherwise important changes, you should look at it after every update.
+2014-10-29 The sender for emails now has to be configured (config key is "email_from")
2014-10-19 Postgresl support
2014-09-20 All PHP errors are now converted to exceptions and execution
terminates if they are not caught. This also works properly
diff --git a/application/config/config.php b/application/config/config.php
index d386a77b8..2191b21df 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -363,6 +363,9 @@ $config['proxy_ips'] = '';
|--------------------------------------------------------------------------
*/
+// This address will be used as the sender for emails (like password recovery mails).
+$config['email_from'] = "webmaster@example.invalid";
+
// upload_path should NOT be readable/served by the server, but only by the script
$config['upload_path'] = FCPATH.'data/uploads';
diff --git a/application/controllers/user.php b/application/controllers/user.php
index b542f2b4c..be4359404 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -340,14 +340,7 @@ class User extends MY_Controller {
))
->insert('actions');
- $admininfo = $this->db->select('email')
- ->from('users')
- ->where('referrer', NULL)
- ->order_by('id', 'asc')
- ->limit(1)
- ->get()->row_array();
-
- $this->email->from($admininfo["email"]);
+ $this->email->from($this->config->item("email_from"));
$this->email->to($userinfo["email"]);
$this->email->subject("FileBin password reset");
$this->email->message(""