From: Michael M Slusarz Date: Tue, 7 Sep 2010 22:55:22 +0000 (-0600) Subject: Remove imp/config/header.php config file X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=33db630ceafe9cdbaff72b938eaf60faecd886bc;p=horde.git Remove imp/config/header.php config file --- diff --git a/imp/config/conf.xml b/imp/config/conf.xml index 0d342c2f4..99165a590 100644 --- a/imp/config/conf.xml +++ b/imp/config/conf.xml @@ -133,9 +133,6 @@ - true true diff --git a/imp/config/header.php.dist b/imp/config/header.php.dist deleted file mode 100644 index 7bde6ec94..000000000 --- a/imp/config/header.php.dist +++ /dev/null @@ -1,25 +0,0 @@ - 'Example Corp.', - - // Add the IP of the remote browser - //'X-Originating-IP' => $_SERVER['REMOTE_ADDR'], - - // Add the Browser information of the remote browser - //'X-Remote-Browser' => $_SERVER['HTTP_USER_AGENT'], - -); diff --git a/imp/config/hooks.php.dist b/imp/config/hooks.php.dist index 6092f3019..926731dc9 100644 --- a/imp/config/hooks.php.dist +++ b/imp/config/hooks.php.dist @@ -196,7 +196,25 @@ class IMP_Hooks */ // public function pre_sent($message, $headers) // { -// // Do action here -- no return value from this hook. +// // Example: Add custom headers to outgoing message. +// $charset = $GLOBALS['registry']->getCharset(); +// $custom_hdrs = array(); +// $hdr_charset = $message->getHeaderCharset(); +// +// /* Add information on organization to which the sender belongs. +// * Not standardized for use in e-mail, but generally recognized. +// * See RFC 2076 [3.7]; RFC 1036 [2.2.8] */ +// $custom_hdrs['Organization'] = 'Example Corp.'; +// +// // Add the IP of the remote browser +// $custom_hdrs['X-Originating-IP'] = $_SERVER['REMOTE_ADDR']; +// +// // Add the Browser information of the remote browser +// $custom_hdrs['X-Remote-Browser'] = $_SERVER['HTTP_USER_AGENT']; +// +// foreach ($custom_hdrs as $key => $val) { +// $headers->addHeader($key, Horde_String::convertCharset($val, $charset, $hdr_charset)); +// } // } diff --git a/imp/docs/UPGRADING b/imp/docs/UPGRADING index 869dac482..15e75178b 100644 --- a/imp/docs/UPGRADING +++ b/imp/docs/UPGRADING @@ -53,8 +53,8 @@ hook. The 'max_from_chars' and 'max_subj_chars' configuration options for the minimal (mimp) display have been removed. -The 'cache_folders', 'limit_factor', and 'sort_limit' configuration options -have been removed. +The 'cache_folders', 'limit_factor', 'prepend_header', and 'sort_limit' +configuration options have been removed. Preferences @@ -84,6 +84,8 @@ The following hooks have been renamed: * x-priority now handled in the core code * old attachment icon handling see atc_flag pref * msglist_flags hook now used to dynamically set flags on messages +* The headers.php configuration file has been removed; setting custom headers + is now done via the 'pre_sent' hook. Fetchmail diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 365ddfe25..d99ac634d 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -595,23 +595,13 @@ class IMP_Compose } $headers->addUserAgentHeader(); - /* Tack on any site-specific headers. */ - try { - $headers_result = Horde::loadConfiguration('header.php', '_header'); - if (is_array($headers_result)) { - foreach ($headers_result as $key => $val) { - $headers->addHeader(trim($key), Horde_String::convertCharset(trim($val), $GLOBALS['registry']->getCharset(), $charset)); - } - } - } catch (Horde_Exception $e) {} - - $sentmail = $GLOBALS['injector']->getInstance('IMP_Sentmail'); - /* Send the messages out now. */ if (!($reply_type = $this->getMetadata('reply_type'))) { $reply_type = 'new'; } + $sentmail = $GLOBALS['injector']->getInstance('IMP_Sentmail'); + foreach ($send_msgs as $val) { try { $this->sendMessage($val['to'], $headers, $val['msg']);