diff options
author | Hugues Hiegel <root@paranoid> | 2015-04-21 12:45:58 +0200 |
---|---|---|
committer | Hugues Hiegel <root@paranoid> | 2015-04-21 12:45:58 +0200 |
commit | ef2e7b3f9d264ec146d4dae257b1e295ab3b462a (patch) | |
tree | 76b4a98d7b3b38f691c4fbee1612197ab6615c2b /plugins/additional_message_headers/additional_message_headers.php | |
parent | d09b64c6270c638059b003922db508f95d32d555 (diff) |
updates - plugins as a separate git folder
Diffstat (limited to 'plugins/additional_message_headers/additional_message_headers.php')
-rw-r--r-- | plugins/additional_message_headers/additional_message_headers.php | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/plugins/additional_message_headers/additional_message_headers.php b/plugins/additional_message_headers/additional_message_headers.php deleted file mode 100644 index 0d16e605e..000000000 --- a/plugins/additional_message_headers/additional_message_headers.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * Additional Message Headers - * - * Very simple plugin which will add additional headers - * to or remove them from outgoing messages. - * - * Enable the plugin in config.inc.php and add your desired headers: - * $config['additional_message_headers'] = array('User-Agent' => 'My-Very-Own-Webmail'); - * - * @version @package_version@ - * @author Ziba Scott - * @website http://roundcube.net - */ -class additional_message_headers extends rcube_plugin -{ - function init() - { - $this->add_hook('message_before_send', array($this, 'message_headers')); - } - - function message_headers($args) - { - $this->load_config(); - - $headers = $args['message']->headers(); - $rcube = rcube::get_instance(); - - // additional email headers - $additional_headers = $rcube->config->get('additional_message_headers', array()); - foreach ((array)$additional_headers as $header => $value) { - if (null === $value) { - unset($headers[$header]); - } - else { - $headers[$header] = $value; - } - } - - $args['message']->_headers = array(); - $args['message']->headers($headers); - - return $args; - } -} |