From e09c6dbd5e81c6c56e9c4f386ff431c0cfe9c2b0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 31 Aug 2010 20:39:25 -0700 Subject: Patch for ticket #1216. Move the values that were in the sendmail config file and store them as gallery module variables. Requires a version number bump to 37. --- modules/gallery/libraries/Sendmail.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/gallery/libraries') diff --git a/modules/gallery/libraries/Sendmail.php b/modules/gallery/libraries/Sendmail.php index ded7b2ef..0fa554b4 100644 --- a/modules/gallery/libraries/Sendmail.php +++ b/modules/gallery/libraries/Sendmail.php @@ -35,10 +35,12 @@ class Sendmail_Core { public function __construct() { $this->headers = array(); - $config = Kohana::config("sendmail"); - foreach ($config as $key => $value) { - $this->$key($value); - } + $domain = Input::instance()->server("HTTP_HOST"); + $this->from(module::get_var("gallery", "email_from", "admin@$domain")); + $this->reply_to(module::get_var("gallery", "email_reply_to", "public@$domain")); + $this->line_length(module::get_var("gallery", "email_line_length", 70)); + $separator = module::get_var("gallery", "email_header_separator", null); + $this->header_separator(empty($separator) ? "\n" : deserialize($separator)); } public function __get($key) { -- cgit v1.2.3